in reply to Re: use constant and exporter
in thread use constant and exporter
And I'm testing it with this:package MyPackage; use Data::Dumper; use 5.006; #use Data::Validate::OO::Tests; use Tests; #use constant { # VALID => 1, # INVALID => 2, # ERROR => 0, # }; use constant VALID => 1; use constant INVALID => 2; use constant ERROR => 0; use strict; use warnings; require Exporter; use AutoLoader qw(AUTOLOAD); our @ISA = qw(Exporter); our %EXPORT_TAGS = ( 'all' => ['VALID','INVALID','ERROR'], 'codes' => ['VALID','INVALID','ERROR'], ); our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = qw(); #Intentionally left blank our $VERSION = v0.0.1;
use MyPackage qw(:all); use Data::Dumper; use strict; use warnings; print STDOUT VALID;
My code doesn't have bugs, it just develops random features.
Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: use constant and exporter
by tall_man (Parson) on Jan 28, 2003 at 05:28 UTC | |
by Flame (Deacon) on Jan 28, 2003 at 05:37 UTC | |
|
Re^3: (nrd) use constant and exporter
by newrisedesigns (Curate) on Jan 28, 2003 at 05:14 UTC | |
by Flame (Deacon) on Jan 28, 2003 at 05:24 UTC |