MeowChow has asked for the wisdom of the Perl Monks concerning the following question:
I would like to do something like:*mysub = eval 'sub { $myvar; }'
The second code snippet is not very well liked by Perl. In case you're wondering why anyone not clinically insane would ever want to do such a thing, the use is for a module which generates and infuses "boilerplate" code for Perl classes. Any ideas on how to make it so?*mysub = eval 'sub : lvalue { $myvar; }'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: lvalue subs of a run-time persuasion
by mdillon (Priest) on Dec 06, 2000 at 09:02 UTC | |
by MeowChow (Vicar) on Dec 06, 2000 at 09:10 UTC | |
|
Re: lvalue subs of a run-time persuasion
by extremely (Priest) on Dec 06, 2000 at 08:51 UTC | |
by MeowChow (Vicar) on Dec 06, 2000 at 09:01 UTC | |
by extremely (Priest) on Dec 06, 2000 at 09:43 UTC |