Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: runtime problem

by tobyink (Abbot)
on Nov 14, 2012 at 18:36 UTC ( #1003871=note: print w/ replies, xml ) Need Help??


in reply to runtime problem

toolic is correct. This is cool though...

sub FakeOO { eval "require $_[0]"; bless \($_[0]), "FakeOO"; } sub FakeOO::AUTOLOAD { my $pkg = ${+shift}; $pkg->can($FakeOO::AUTOLOAD =~ /::(\w+)$/)->(@_); } my $scalar_util = FakeOO("Scalar::Util"); $scalar_util->looks_like_number(123);
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: runtime problem
Download Code
Re^2: runtime problem
by jonagondos (Novice) on Nov 14, 2012 at 20:00 UTC
    thanks guys
Re^2: runtime problem
by ColonelPanic (Friar) on Nov 15, 2012 at 10:29 UTC
    Yes, pretty cool.

    And it also pretty much sums up why Perl is so loved and hated by so many people. You can do any insane, ill-advised thing you want :)



    When's the last time you used duct tape on a duct? --Larry Wall

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-09-23 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (218 votes), past polls