Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Use variable as a module during runtime.

by tobyink (Abbot)
on Oct 21, 2012 at 08:16 UTC ( #1000182=note: print w/ replies, xml ) Need Help??


in reply to Use variable as a module during runtime.

my $string = <<'STRING'; package Foo; sub new { bless [] => shift } sub foo { print "foo!\n" } STRING eval $string; my $foo = Foo->new; $foo->foo;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: Use variable as a module during runtime.
Download Code
Re^2: Use variable as a module during runtime.
by yoda54 (Monk) on Oct 22, 2012 at 23:42 UTC
    Thanks!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2014-09-19 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (138 votes), past polls