sybperl-l Archive
Up Prev Next
From: David Hajoglou <hojo at greenland dot i-tel dot com>
Subject: Re: passing $dbh around
Date: Jun 10 1999 9:59PM
> >
> > script
> > ...
> > $var = &itel::itel_lib::somefunc($dbh);
> > ...
> >
>
> The way you're doing it in the snippet above is just fine. A database
> handle is just a normal scalar, so you can pass it around as much as
> you like.
>
Does this copy the handle when I pass it into the module?
sub somefunc {
my $newdbh = @_;
...
}
The reason I am asking is that we are connecting to an MSSQL database that
has a user limmit. As a result we are finding out selves running out of
logins. We are doing everything to keep the number of handles down.
Idealy, persistant handles would be the way to go.
|