in reply to Re: OOP Access of variables
in thread OOP Access of variables

Sorry, I must not have made it clear.

I mean, each time the main script is run, I only want one instance of the database connection. This is created in TArtLib ($TArtLib::dbh).

I want TArt::Editor to be able to use $TArtLib::dbh, so that TArt::Editor doesn't need to make a new DB connection. Both TArtLib and TArt::Editor will/should always be used in package main.

Replies are listed 'Best First'.
Re: Re: Re: OOP Access of variables
by simeon2000 (Monk) on Mar 08, 2001 at 21:29 UTC
    ... the reason being, if I have 40 editor objects, I don't want 40 database handles. I'd like all 40 TArt::Editor objects to use TArtLib's DB connection.