Skip Menu |

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

Report information
The Basics
Id: 4036
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: chris [...] dyndns.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.20
Fixed in: (no value)



Subject: find_PL_files() Broken
process_PL_files() expects find_PL_files() to return a hashref of C<<$PL_file => \@created_files>> pairs, however both the arrayref and magical version of find_PL_files() return a hahref of C<<$PL_File => $created_file>> pairs. This results in a error such as: ctriv@shadowfax:~/dyndns/dynlib$ ./Build /usr/local/bin/perl lib/DynDNS.pm.PL Can't use string ("lib/DynDNS.pm") as an ARRAY ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.8.1/Module/Build/Base.pm line 1087. Patch against .20_02 attached.
--- lib/Module/Build/Base.pm~ Tue Oct 7 07:24:40 2003 +++ lib/Module/Build/Base.pm Tue Oct 7 07:35:47 2003 @@ -1159,7 +1159,7 @@ # 'PL_files' is given as a Unix file spec, so we localize_file_path(). if (UNIVERSAL::isa($files, 'ARRAY')) { - return { map {$_, /^(.*)\.PL$/} + return { map {$_, [/^(.*)\.PL$/]} map $self->localize_file_path($_), @$files }; @@ -1177,7 +1177,7 @@ } return unless -d 'lib'; - return { map {$_, /^(.*)\.PL$/} @{ $self->rscan_dir('lib', qr{\.PL$}) } }; + return { map {$_, [/^(.*)\.PL$/]} @{ $self->rscan_dir('lib', qr{\.PL$}) } }; } sub find_pm_files { shift->_find_file_by_type('pm') }
Thanks, I've made the patch. Looks like this bug affected people who had a .PL file auto-detected in their lib/ directory, or specified with an array reference (an undocumented way to do things). Specifying .PL files with a hash reference, as documented, should have been working fine.
Tests have now been written, so bug is closed. -Ken