Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Re: Tutorial: Introduction to Object-Oriented Programming

by demerphq (Chancellor)
on Dec 15, 2002 at 01:45 UTC ( #219935=note: print w/replies, xml ) Need Help??


in reply to Re^2: Tutorial: Introduction to Object-Oriented Programming
in thread Tutorial: Introduction to Object-Oriented Programming

Unfortunately, there isn't an overload::NumVal to match overload::StrVal (unless I'm missing something somewhere ;-)

I think the best way to do this is Scalar::Util::refaddr. And its much faster than parsing overload::StrVal.
:-)

But it isn't core (at 5.6 anyway)
:-(

--- demerphq
my friends call me, usually because I'm late....

  • Comment on Re: Re: Re: Tutorial: Introduction to Object-Oriented Programming

Replies are listed 'Best First'.
Re^4: Tutorial: Introduction to Object-Oriented Programming
by adrianh (Chancellor) on Dec 15, 2002 at 01:49 UTC

    You mindreader you! I was just on my way to update the node after discovered refaddr!.

    It's much faster than my reblessing hack too.


    Update: It isn't much faster. In fact, it's almost exactly the same as my quick hack. Goodness knows what I wrote in my benchmark script :-)

    Another update: It is much faster if you have the XS version. It isn't if you don't :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2016-10-01 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (9 votes). Check out past polls.