Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: OOP Access of variables

by simeon2000 (Monk)
on Mar 08, 2001 at 16:27 UTC ( [id://63019]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 16: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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://63019]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.