Batara Kesuma wrote:
But I have a problem here, because I
use 'our' on $dbh so other functions can use it. It looks like:

---
sub show_name {
  our $dbh;
  my $sth = $dbh->prepare("SELECT name FROM member WHERE id=?");
  $sth->execute(1);
  ...
}

## MAIN
my $mn = MyPackage::Main::->new();
our $dbh = $mn->load_dbh();

It looks to me like you are creating this problem by using "our". Why not use "my" and pass the handle around, or put it somewhere like $r->pnotes() instead?


Also, why do you want to avoid persistent connections?

- Perrin

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to