typos, sorry. Damned cut and paste
Jamie LeTual wrote:
>
> How about this:
>
> #======= mymodule.pm =========
> package mymodule;
> use strict;
>
> sub new
> {
> my $type = shift;
> my $conf = shift;
>
> my $self = { conf => require $conf };
> bless $self, $type;
>
> return $self;
> }
>
> 1;
> #======= conf.pl =========
> { web_name => 'foo.com' };
>
-> #======= conf.pm =========
+> #======= somefile.pl =========
> #!/usr/bin/perl
> use strict;
> use Data::Dumper;
> use mymodule;
>
-> my $m = mymodule->new('conf.pm');
+> my $m = mymodule->new('conf.pl');
> print Dumper($m);
>
...
--
-[sent from home]-----------------------------------------------
| Jamie LeTual |Email : [EMAIL PROTECTED] |
| Programmeur Errant |Phone : (514) 523-0940 |
| |PGP : http://people.hbe.ca/~jamie |
|__________________________|____________________________________|