Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How might I return tied scalar that does not have to be dereferenced as $$scalar?

by chromatic (Archbishop)
on Sep 18, 2002 at 15:59 UTC ( [id://198883]=note: print w/replies, xml ) Need Help??


in reply to How might I return tied scalar that does not have to be dereferenced as $$scalar?

Seems to me you can just throw a tie call in new -- and don't call bless. If you provide a FETCH method along with your other methods, you should be okay.

Of course, if all you want to do is to provide a sane value for $d when it's stringified, you can use the overload pragma to overload the stringification operator. That may be even simpler.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-29 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found