Skip Menu |

This queue is for tickets about the Module-Install-GetProgramLocations CPAN distribution.

Report information
The Basics
Id: 127386
Status: new
Priority: 0/
Queue: Module-Install-GetProgramLocations

People
Owner: Nobody in particular
Requestors: ptizoom [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.3012
Fixed in: (no value)



Subject: Module::Install::Can::can_run called without object
...trying to install DCOPPIT/grepmail-5.3111.tar.gz under cygwin. and running the topical.. perl Makefile.PL It crashes into a call of ... ExtUtils::MM_Cygwin::maybe_command("MM", undef) what is the best way to fix that ? - can we put $ENV{PATH} as a default search path? - or we have some incompatibilities in calling the {::maybe_command}("MM") ? and then need to make the can_run more robust upfront? thx ==== the croak backtrace: ... can't convert empty path at /usr/share/perl5/vendor_perl/5.26/ExtUtils/MM_Cygwin.pm line 116. at /usr/share/perl5/vendor_perl/5.26/ExtUtils/MM_Cygwin.pm line 116. ExtUtils::MM_Cygwin::maybe_command("MM", undef) called at inc/Module/Install/Can.pm line 35 Module::Install::Can::can_run(Module::Install::Can=HASH(0x601174a50)) called at inc/Module/Install/GetProgramLocations.pm line 162 Module::Install::GetProgramLocations::_prompt_user_for_program_locations(Module::Install::GetProgramLocations=HASH(0x60123fe48), HASH(0x601246b20)) called at inc/Module/Install/GetProgramLocations.pm line 62 Module::Install::GetProgramLocations::get_program_locations(undef, undef, undef, undef) called at inc/Module/Install/PRIVATE/Configure_Programs.pm line 62 Module::Install::PRIVATE::Configure_Programs::configure_programs(Module::Install::PRIVATE::Configure_Programs=HASH(0x6013cfe68)) called at Makefile.PL line 54 ==== this is with installed extutils: Module id = ExtUtils::MM_Cygwin CPAN_USERID BINGOS (Chris Williams <chris@bingosnet.co.uk>) CPAN_VERSION 7.34 CPAN_FILE B/BI/BINGOS/ExtUtils-MakeMaker-7.34.tar.gz UPLOAD_DATE 2018-03-19 MANPAGE ExtUtils::MM_Cygwin - methods to override UN*X behaviour in ExtUtils::MakeMaker INST_FILE /usr/share/perl5/vendor_perl/5.26/ExtUtils/MM_Cygwin.pm INST_VERSION 7.34 ==== here the %info for ... Module::Install::GetProgramLocations::_prompt_user_for_program_locations() DB<<19>> x %info 0 'bzip' 1 HASH(0x6016807e8) 'argname' => 'BZIP' 'default' => 'bzip2' 'types' => HASH(0x6016807a0) 'bzip2' => HASH(0x601680740) 'fetch' => CODE(0x601280c18) -> &Module::Install::GetProgramLocations::get_bzip2_version in inc/Module/Install/GetProgramLocations.pm:393-402 'numbers' => '[1.0,)' 2 'xz' 3 HASH(0x601680668) 'argname' => 'XZ' 'default' => 'xz' 4 'gzip' 5 HASH(0x6016806c8) 'argname' => 'GZIP' 'default' => 'gzip' 6 'diff' 7 HASH(0x601648eb0) 'argname' => 'DIFF' 'default' => 'diff' 8 'cat' 9 HASH(0x6015cbaf0) 'argname' => 'CAT' 'default' => 'cat' 10 'bzip2' 11 HASH(0x601680920) 'argname' => 'BZIP2' 'default' => 'bzip2' 'types' => HASH(0x6016808d8) 'bzip2' => HASH(0x601680878) 'fetch' => CODE(0x601280c18) -> REUSED_ADDRESS 'numbers' => '[1.0,)' 12 'lzip' 13 HASH(0x601680608) 'argname' => 'LZIP' 'default' => 'lzip' 'types' => HASH(0x601680518) 'GNU' => HASH(0x60167fcf0) 'fetch' => CODE(0x601277970) -> &Module::Install::GetProgramLocations::get_gnu_version in inc/Module/Install/GetProgramLocations.pm:362-388 'numbers' => '[1.3,)'
between us....in Module::Install::Can, the following hack in can_run() makes do: # Check if we can run some command sub can_run { my ($self, $cmd) = @_; #PTZ181017 ExtUtils::MM_Cygwin::maybe_command("MM", undef) not happy. return unless(defined ($cmd)); #PTZ181017 my $_cmd = $cmd; return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd)); for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { next if $dir eq ''; require File::Spec; my $abs = File::Spec->catfile($dir, $cmd); return $abs if (-x $abs or $abs = MM->maybe_command($abs)); } return; } ....