Skip Menu |

This queue is for tickets about the Test-Compile CPAN distribution.

Report information
The Basics
Id: 73290
Status: resolved
Priority: 0/
Queue: Test-Compile

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13
Fixed in: (no value)



Subject: two modules which export conflicting methods produce warnings
The current behavior is to never unload a module from memory, so if you test two modules with conflicting exports, you can warnings. The warnings can make it appear that there is a problem, when there is not. This example illustrates the issue, but requires a bit of modification to point to where CGI.pm and CGI::Carp are installed on your system: use lib 'perllib'; use Test::Compile 'no_plan'; BEGIN { pm_file_ok('perl5/perlbrew/build/perl-5.14.2/lib/Carp.pm'); pm_file_ok('perllib/CGI/Carp.pm'); } Running that produces the following output: ok 1 - Compile test for perl5/perlbrew/build/perl-5.14.2/lib/Carp.pm Subroutine export_fail redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 43. Subroutine _cgc redefined at /home/ubuntu/perl5/perlbrew/perls/perl- 5.14.2/lib/5.14.2/Carp.pm line 45. Subroutine longmess redefined at /home/ubuntu/perl5/perlbrew/perls/perl- 5.14.2/lib/5.14.2/Carp.pm line 51. Subroutine shortmess redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 71. Subroutine croak redefined at /home/ubuntu/perl5/perlbrew/perls/perl- 5.14.2/lib/5.14.2/Carp.pm line 79. Subroutine confess redefined at /home/ubuntu/perl5/perlbrew/perls/perl- 5.14.2/lib/5.14.2/Carp.pm line 80. Subroutine carp redefined at /home/ubuntu/perl5/perlbrew/perls/perl- 5.14.2/lib/5.14.2/Carp.pm line 81. Subroutine cluck redefined at /home/ubuntu/perl5/perlbrew/perls/perl- 5.14.2/lib/5.14.2/Carp.pm line 82. Subroutine caller_info redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 84. Subroutine format_arg redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 139. Subroutine get_status redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 167. Subroutine get_subname redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 176. Subroutine long_error_loc redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 194. Subroutine longmess_heavy redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 222. Subroutine ret_backtrace redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 230. Subroutine ret_summary redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 252. Subroutine short_error_loc redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 267. Subroutine shortmess_heavy redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 291. Subroutine str_len_trim redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 304. Subroutine trusts redefined at /home/ubuntu/perl5/perlbrew/perls/perl- 5.14.2/lib/5.14.2/Carp.pm line 319. Subroutine trusts_directly redefined at /home/ubuntu/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/Carp.pm line 339. ok 2 - Compile test for perllib/CGI/Carp.pm
I think this is fixed in version 0.15. The module now forks a child process to check the syntax of each file, which should stop the parent process from actually loading the name space of the files being checked.