Ing. Branislav Gerzo wrote:
> Bob Showalter [BS], on Friday, February 11, 2005 at 08:07 (-0500)
> typed the following:
> > c) Have $dbh live in Bar.pm and use Exporter to export it back to
> > the main program, or
> 
> I want set $dbh in main script.

You can still do that. You would do something like this:

   package Foo::Bar;

   use base 'Exporter';
   our @EXPORT = qw/$dbh/;
   our $dbh;

...

Then in the main program:

   use Foo::Bar;

   $dbh = DBI->connect(...blah...);

-- 
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