> > So what I need to know I guess is:
> > 1) in MYSuperModule.pm do I
> > a) use DBI;
> > b) sub DBI::db::myfunc {} or sub ???::Myfunc {}
> > 2) What is the best way to do that without causing namespace
> > problems?
> >
> > So answer a question with a question!
>
> Dan, you might want to have a look here for details right
> from the horse's
> mouth:
> http://search.cpan.org/author/TIMB/DBI-1.37/DBI.pm#Subclassing_the_DBI
Howdy all,
Instead of screwing up name spaces and sub classing I think
I'll just pass the $dbh as an argument to the routine like so:
Instead of : $dbh->myfunc();
I'll do : myfunc($dbh);
sub myfunc { # instead of sub DBI::db::myfunc {}
my $dbh = shift;
$dbh->.......
}
That works very swell but I am wondering if there's anything about
doing it that way that I'm missing, any drawbacks, insecurities, etc...
TIA
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]