Files
termux-packages/packages/perl/cpan-force-auto-local-lib.patch
termux-pacman-bot 19ec75b865 fix(main/perl): force cpan to never interactively prompt to use local::lib, just always default to it
Gets rid of this infinite loop that can permanently freeze many noninteractive scripts which need to run `cpan`:

```
What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib]
Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib]
Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib]
Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib]
```
2025-11-06 11:35:45 +00:00

11 lines
456 B
Diff

--- a/cpan/CPAN/lib/CPAN/FirstTime.pm
+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm
@@ -904,7 +904,6 @@ sub init {
unless ( $matcher
|| _can_write_to_libdirs() || _using_installbase() || _using_sudo()
) {
- local $auto_config = 0; # We *must* ask, even under autoconfig
local *_real_prompt; # We *must* show prompt
my_prompt_loop(install_help => 'local::lib', $matcher,
'local::lib|sudo|manual');