Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Doubt about fly-weight objects.

by diotalevi (Canon)
on May 17, 2005 at 19:12 UTC ( [id://457959]=note: print w/replies, xml ) Need Help??


in reply to Doubt about fly-weight objects.

I've only seen one useful use of this in perl and it was absolutely necessary in that case: when you've overloaded the type of dereferencing the object is based on. Data::Postponed uses scalar based objects and overloads everything including ${}. This now effectively prevents me from storing anything inside the object because I can never get access to it. The workaround is to use the object's stringification "Data::Postponed::Forever=SCALAR(0x8141758)" as a key to a global and store all of the object's internals in that global.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found