Ronald J Kimball wrote:

> On Thu, Jun 13, 2002 at 04:54:15PM -0400, James Pittman wrote:
> > Hi,
> >     I have many many perl programs that do the following:
> >
> >     use DBI;
> >     use DBD::Oracle;
> >
> > If I also put:
> >     use strict;
> >
> > and type:
> >     perl -cw filename.pl
> >
> > I get:
> > Variable "$sth" is not imported at filename.pl line XXX
> > Global symbol "sth" requires explicit package name at filename.pl line
> > 261
> >
> > Is there a good way to get around this?  I would like to "use strict"
> > but I'd like to get rid of those errors.
>
> This is not a DBI question; it is a basic Perl question.  Refer to perldoc
> strict and perldoc -f my.
>
> Ronald

OK I doublechecked and you're right - I don't "use DBD::Oracle".

and - thanks - yes - I was thinking that $sth was a DBI global variable that
was automatically accessible by me.  We use another perl module that was not
created by me to set up the database connection, and IT defines $sth...

I should really re-do that other perl module so that it's more
object-oriented.

Thanks,
Jamie

Reply via email to