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

Owner: Nobody in particular
Requestors: chris [...]

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


Subject: find_PL_files() Broken
Download (untitled) / with headers
text/plain 525b
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/ Can't use string ("lib/") as an ARRAY ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.8.1/Module/Build/ line 1087. Patch against .20_02 attached.
Download module-build.diff
text/x-diff 679b
--- lib/Module/Build/ Tue Oct 7 07:24:40 2003 +++ lib/Module/Build/ 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') }
Download (untitled) / with headers
text/plain 291b
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

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to