Skip Menu |

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

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

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

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



Subject: test_files argument processing causes warnings in Notes.pm
Looks like something in the argument parsing is off and is storing undefs in $self->{new}, which later causes warnings in Notes.pm. Shutting up the warning would be easy, but it seems indicative of something unintended upstream. It's also sequence dependent, based on what keys are getting cached, I imagine: 3 warnings: --test_files 1 warning: --test_files x works fine: --test_files=x works fine: --test_files The latter case is a sort of unintended bug/feature in M::B in that it tests all files rather than none. (I have an alias for "Build verbose=1 --test_files" that I use to run a single .t or all of them under verbosity.) Examples follow: (0) $ Build test --test_files Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.5/Module/Build/Notes.pm line 79. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.5/Module/Build/Notes.pm line 79. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.5/Module/Build/Notes.pm line 79. t/Exception_Class_TryCatch....ok All tests successful. Files=1, Tests=42, 0 wallclock secs ( 0.22 cusr + 0.02 csys = 0.24 CPU) (0) $ Build test --test_files t/Exception_Class_TryCatch.t Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.5/Module/Build/Notes.pm line 79. t/Exception_Class_TryCatch....ok All tests successful. Files=1, Tests=42, 0 wallclock secs ( 0.22 cusr + 0.03 csys = 0.25 CPU) (0) $ Build test --test_files=t/Exception_Class_TryCatch.t t/Exception_Class_TryCatch....ok All tests successful. Files=1, Tests=42, 1 wallclock secs ( 0.21 cusr + 0.04 csys = 0.25 CPU) (0) $ Build test --test_files t/Exception_Class_TryCatch.t t/Exception_Class_TryCatch....ok All tests successful. Files=1, Tests=42, 0 wallclock secs ( 0.22 cusr + 0.04 csys = 0.26 CPU)
Hi Dan, This is happening because we use our own argument-processing code, rather than something more robust like Getopt::Long. In this case, the fact that --test_files has a mandatory string argument (or several of them), and you aren't giving it one, is confusing it. We've got plans to switch to using Getopt::Long or something similar for handling all the command-line parsing, which I believe will solve this issue. In the meantime, I think a workaround would be for you to feed "t/*.t" to your shell alias. -Ken
RT-Send-CC: module-build [...] perl.org