martymart has asked for the wisdom of the Perl Monks concerning the following question:
config.pl an example of a file that uses the above package:package configs; use Exporter; use warnings; use strict; our @ISA = ("Exporter"); our @EXPORT = qw( %instarray ); our %instarray = (aa => "aakeyword", bb=> "bbkeyword", cc => "cckeyword", dd => "ddkeyword", ee => "eekeyword", ff => "ffkeyword", ); 1;
Are there other (better?) ways to achieve this, any problems with using "our" in this way?#!usr/bin/perl -w use strict; use warnings; use configs; foreach my $tag (keys %instarray){ print "$tag - $instarray{$tag} \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: config package file
by davorg (Chancellor) on Nov 19, 2004 at 10:41 UTC | |
|
Re: config package file
by Mutant (Priest) on Nov 19, 2004 at 12:02 UTC | |
|
Re: config package file
by bobf (Monsignor) on Nov 19, 2004 at 23:23 UTC |