![]() |
![]()
| ![]() |
![]()
NAMEDevel::EvalContext - Save lexicals and hints between calls to eval SYNOPSISuse Devel::EvalContext; my $cxt = Devel::EvalContext->new; $cxt->run(q{ my $a = 5; }); $cxt->run(q{ print $a; }); DESCRIPTIONSometimes it's necessary to run some code that creates lexicals and then run more code that uses the same ones. Perhaps it's in an interactive development environment. However, unlike Scheme, perl's eval primitive doesn't take an extra parameter to specify the environment to evaluate inside of. This module corrects this deficit. METHODSnewCreate a new, empty context. It has no lexicals and hints are set to zero. runEquivalent to eval but with a context specified. SUPPORTPlease send bugs, queries or encouragement to <bug-Devel-EvalContext@rt.cpan.org> or <bsmith@cpan.org>. SEE ALSOperlfunc AUTHORBenjamin Smith <bsmith@cpan.org> COPYRIGHT AND LICENSECopyright (C) 2006 by Benjamin Smith. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
|