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?? |
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.
In Section
Seekers of Perl Wisdom
|
|