Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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'

Replies are listed 'Best First'.
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?
[choroba]: I sent him the invitations for the last two meetings, but he didn't arrive
[choroba]: ^ should have been a /msg

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2017-09-25 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (280 votes). Check out past polls.

    Notices?