Skip Menu |

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

Report information
The Basics
Id: 46389
Status: resolved
Priority: 0/
Queue: Test-UseAllModules

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: uninit $RULE when no import
Date: Wed, 27 May 2009 09:52:16 +1000
To: bug-Test-UseAllModules [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
In Test::UseAllModules 0.11 with the debian packaged perl 5.10.0, the program foo.t below gets an error Use of uninitialized value $RULE in regexp compilation at /usr/share/perl5/Test\/UseAllModules.pm line 38. I'd been using this "require" style to run Test::UseAllModules if installed, or skip if not. It was ok with 0.10, I wonder if it could continue to work. I don't need to specify an "under" option, so if $RULE defaulted to 'lib' or whatever that would be enough. I imagine I could "eval 'use Test::UseAllModules'", but I think it's usually cleanest for modules not to depend on their import() having run, at least for plain non-pragma modules, if you know what I mean.
#!/usr/bin/perl use strict; use warnings; use Test::More; if (eval { require Test::UseAllModules }) { Test::UseAllModules::all_uses_ok (except => qw(Some::Dependent::Module Another::Dependent::Module ^Yet::Another::Dependent::.* )); } exit 0;
fixed in 0.12 (coming to CPAN). thanks. On Tue May 26 19:53:22 2009, user42@zip.com.au wrote: Show quoted text
> In Test::UseAllModules 0.11 with the debian packaged perl 5.10.0, the > program foo.t below gets an error > > Use of uninitialized value $RULE in regexp compilation at > /usr/share/perl5/Test\/UseAllModules.pm line 38. > > I'd been using this "require" style to run Test::UseAllModules if > installed, or skip if not. It was ok with 0.10, I wonder if it could > continue to work. > > I don't need to specify an "under" option, so if $RULE defaulted to > 'lib' or whatever that would be enough. I imagine I could "eval 'use > Test::UseAllModules'", but I think it's usually cleanest for modules > not > to depend on their import() having run, at least for plain non-pragma > modules, if you know what I mean. >