Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Garbage collected class attributes with inside out classes.

by kyle (Abbot)
on Mar 02, 2007 at 03:02 UTC ( [id://602817]=note: print w/replies, xml ) Need Help??


in reply to Re: Garbage collected class attributes with inside out classes.
in thread Garbage collected class attributes with inside out classes.

This sounds simple, but I still don't know what you mean. Could you show code for this?

  • Comment on Re^2: Garbage collected class attributes with inside out classes.

Replies are listed 'Best First'.
Re^3: Garbage collected class attributes with inside out classes.
by rir (Vicar) on Mar 02, 2007 at 03:50 UTC
    Just that I'd limit the counter variable to the routines that need it; so it seems that the variable doesn't exist in parts of your class that are outside the scope created by the outermost brackets below.
    { my $count; # Number of class instances that exist. sub BUILD { ++$count; # } sub DEMOLISH { --$count; # } }
    Be well,
    rir

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://602817]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-18 06:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found