Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Fun with caller()

by phroggy (Monk)
on May 28, 2005 at 22:45 UTC ( #461420=obfuscated: print w/replies, xml ) Need Help??

#!/usr/bin/perl use strict; use warnings; sub JAPH { Just ();}sub Just { another ();}sub another { Perl ();}sub Perl { hacker (",\n");}sub hacker { print((join' ',map{(split'::',(caller(3-$_))[3])[1]}(0..3)),@_);}&JA +PH;

Replies are listed 'Best First'.
Re: Fun with caller()
by cristian (Hermit) on May 30, 2005 at 14:27 UTC
    ja ja you like caller. This example is for explanation the obfus code #!/usr/bin/perl sub Just_another::Perl_hacker{(caller(0))[3]} #caller = procedure name => Just_another::Perl_hacker $_=Perl_hacker Just_another; #$_=Just_another::Perl_hacker stored ~s/_|::/ /g; #replace :: and _ for spaces on $_ print; #printing $_ => sub name clean

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2022-05-27 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (97 votes). Check out past polls.

    Notices?