Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Getting file and line number where a subroutine is declared

by ikegami (Patriarch)
on Feb 02, 2009 at 19:32 UTC ( [id://740792]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    {
        no strict 'refs';
    ...
        print B::svref_2object(\&$name)->GV->LINE;
        $name->();
    }
    
  2. or download this
    my $glob = $::{'Foo::'}{some_sub};
    print B::svref_2object(\*$glob)->LINE;
    print B::svref_2object(\&$glob)->GV->LINE;
    $glob->();
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found