my openconf function contains:

sub openconf {
   my $pkg = shift;
   my $self = bless([EMAIL PROTECTED],$pkg);
   open(...
   ....
   return($self);
}

I have "my @config;" set at the beggining of the module

-------------------------------------
This mail is from: <[EMAIL PROTECTED]>
-------------------------------------

On Wed, 12 May 2004, Wiggins d Anconia wrote:

> > Hi,
> > I'm trying to create library that can open many config files. For
> > examlpe, I have cfg1.conf and cfg2.conf. My lib is getting information
> > from those files and store it into an array. If I do:
> >
> > my $cfg1 = My::Lib->openconf("cfg1.conf");
> > my $cfg2 = My::Lib->openconf("cfg2.conf");
> >
> > print $cfg1->param("someparam");
> > print $cfg2->param("someparam");
> >
> > it prints two times the param from second conf file. Any ideas or I wasn't
> > clear enough ?:")
> > Btw sorry for my bad english
> >
>
> We will probably need to see your My::Lib, specifically the 'openconf'
> and 'param' methods to help...
>
> Consider using a configuration implementation from CPAN (there are lots)
> instead of growing your own.
>
> http://danconia.org
>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to