Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: how to get alias name of anonymous sub?

by PeterPeiGuo (Hermit)
on Nov 29, 2010 at 03:32 UTC ( [id://874171]=note: print w/replies, xml ) Need Help??


in reply to how to get alias name of anonymous sub?

Observe the result from print Dumper(caller(0));

Peter (Guo) Pei

  • Comment on Re: how to get alias name of anonymous sub?

Replies are listed 'Best First'.
Re^2: how to get alias name of anonymous sub?
by gian (Novice) on Nov 29, 2010 at 03:39 UTC
    this is output with Dumper.
    $VAR1 = 'main'; $VAR2 = 'D:\\test.pl'; $VAR3 = 12; $VAR4 = 'main::__ANON__'; $VAR5 = 1; $VAR6 = undef; $VAR7 = undef; $VAR8 = undef; $VAR9 = 0; $VAR10 = ' '; $VAR1 = 'main'; $VAR2 = 'D:\\test.pl'; $VAR3 = 13; $VAR4 = 'main::__ANON__'; $VAR5 = 1; $VAR6 = undef; $VAR7 = undef; $VAR8 = undef; $VAR9 = 0; $VAR10 = ' ';
    it seem not useful.caller only return these values
    # 0 1 2 3 4 ($package, $filename, $line, $subroutine, $hasargs, # 5 6 7 8 9 10 $wantarray, $evaltext, $is_require, $hints, $bitmask, $hinthash) += caller($i);
    maybe we should try another way.

Log In?
Username:
Password:

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

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

    No recent polls found