Flame has asked for the wisdom of the Perl Monks concerning the following question:
package MyPackage; use Data::Dumper; use 5.006; use Tests; use constant { VALID => 1, INVALID => 2, ERROR => 0, }; use strict; use warnings; require Exporter; use AutoLoader qw(AUTOLOAD); our @ISA = qw(Exporter); our %EXPORT_TAGS = ( 'all' => [ qw(VALID INVALID ERROR) ], 'codes' => [ qw(VALID INVALID ERROR)], ); our @EXPORT_OK = qw(@{ $EXPORT_TAGS{'all'} }); our @EXPORT = qw(); #Intentionally left blank our $VERSION = v0.0.1;
When I use MyPackage qw(:all); and then attempt to use the VALID, INVALID or ERROR constants, I get error messages saying bareword "VALID" not allowed while "strict subs". Am I doing something wrong here?
Thanks
My code doesn't have bugs, it just develops random features.
Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use constant and exporter
by artist (Parson) on Jan 28, 2003 at 04:10 UTC | |
|
Re: use constant and exporter
by batkins (Chaplain) on Jan 28, 2003 at 03:36 UTC | |
by Flame (Deacon) on Jan 28, 2003 at 03:41 UTC | |
|
Re: use constant and exporter
by tall_man (Parson) on Jan 28, 2003 at 04:30 UTC | |
by Flame (Deacon) on Jan 28, 2003 at 04:52 UTC | |
by tall_man (Parson) on Jan 28, 2003 at 05:28 UTC | |
by Flame (Deacon) on Jan 28, 2003 at 05:37 UTC | |
by newrisedesigns (Curate) on Jan 28, 2003 at 05:14 UTC | |
by Flame (Deacon) on Jan 28, 2003 at 05:24 UTC | |
|
Re: use constant and exporter
by Aristotle (Chancellor) on Jan 28, 2003 at 11:58 UTC | |
by Flame (Deacon) on Jan 28, 2003 at 22:15 UTC | |
by Aristotle (Chancellor) on Jan 28, 2003 at 22:33 UTC | |
by Flame (Deacon) on Jan 28, 2003 at 23:08 UTC |