Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: find out method name from the reference

by phaylon (Curate)
on Aug 19, 2008 at 11:20 UTC ( #705174=note: print w/ replies, xml ) Need Help??

in reply to find out method name from the reference

Could Sub::Identify help?

From the Synopsis:

use Sub::Identify ':all'; my $subname = sub_name( $some_coderef );

Ordinary morality is for ordinary people. -- Aleister Crowley

Comment on Re: find out method name from the reference
Download Code
Replies are listed 'Best First'.
Re^2: find out method name from the reference
by taghi (Initiate) on Oct 07, 2008 at 19:33 UTC

    Even better.

    The Devel::Peek::CvGV() method is a little vague since the man page mentions that it returns "one of" the globs associated with a subroutine reference. I'm not sure what others might exist, but this would certainly imply that there might be more than one.

    The Sub::Identify module is based on B, which seems like it's a little more appropriate for my use. Plus, it's a little more flexible in exactly what I get back.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2015-11-26 07:57 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (696 votes), past polls