In your script ...package test0; use Exporter; our @ISA = qw( Exporter ); our @EXPORT_OK = qw( $data ); our $data = { .... }; 1;
#! use strict; use warnings; my $pmfile = shift @ARGV; my $pm = eval "use $pmfile '\$data';"; die $@ if $@; my $pckg = $data;
In reply to Re: modules as data files
by dragonchild
in thread modules as data files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |