OK, I've been coding since 5am, so I assume I'm just tired,
but I can't figure this out.
I have a bunch of perl constants that I put in a module.
I'm trying to use that module in two different places.
I'm getting an error:
Bareword "CONSTANTNAME" not allowed while "strict subs" in use
Here's a simplified testcase.
FILENAME: constant1.pm
------------------------
sub NUM_MUSKETEERS() {3}
1;
FILENAME: mod1.pm
------------------------
package mod1;
use warnings;
use strict;
use constant1;
foreach my $i (1..NUM_MUSKETEERS){
print "mod1: $i\n";
}
1;
FILENAME: mod2.pm
------------------------
package mod2;
use warnings;
use strict;
use constant1;
foreach my $i (1..NUM_MUSKETEERS){
print "mod2: $i\n";
}
1;
FILENAME: script.pl
-------------------------
#!/usr/bin/perl
use warnings;
use strict;
use mod1;
use mod2;
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm