Perl "cpan[1]>" interactive config prompt hangs CI
The classic CPAN.pm client tries to configure itself interactively on first run and waits for input. In CI there is no TTY, so the job hangs until it times out. You must run everything non-interactively.
What this error means
The build stalls at a "cpan[1]>" prompt or "Would you like to configure as much as possible automatically? [yes]" with no further output until the step times out.
cpan
CPAN.pm requires configuration, but most of it can be done automatically.
Would you like me to configure as much as possible automatically? [yes]
cpan[1]>Common causes
CPAN.pm first-run interactive configuration
On a fresh runner, CPAN.pm has no config and prompts for it interactively, which never completes without a TTY.
Module build asking a question with no default answer
Some Makefile.PL/Build.PL scripts prompt for options; without non-interactive defaults, the build waits forever.
How to fix it
Force non-interactive defaults
- Export PERL_MM_USE_DEFAULT=1 so prompts take their default answer.
- Set PERL_MM_NONINTERACTIVE=1 and use cpanm, which is non-interactive by design.
- Avoid the legacy
cpanshell in CI.
Terminal
export PERL_MM_USE_DEFAULT=1
export PERL_MM_NONINTERACTIVE=1
cpanm --notest My::ModulePre-seed CPAN config if you must use cpan
Auto-configure CPAN.pm once with the default answers instead of prompting.
Terminal
yes '' | cpan -T App::cpanminusHow to prevent it
- Set PERL_MM_USE_DEFAULT=1 for all Perl build steps in CI.
- Prefer cpanm over the interactive cpan shell.
- Add a job-level timeout so a hung prompt fails fast instead of burning minutes.
Related guides
Perl "cpanm: command not found" in CIFix "cpanm: command not found" in CI - the runner has Perl but no cpanminus installed, or cpanm is not on PAT…
Perl "warning: Setting locale failed" in CIFix "perl: warning: Setting locale failed" in CI - Perl could not honor the LC_* / LANG environment values be…
Perl "carton install ... failed" in CIFix "carton install" failures in CI - carton drives cpanm to install the cpanfile dependencies and a build, t…