|
NAMEDevel::REPL::Plugin::OutputCache - Remember past results, _ is most recentVERSIONversion 1.003028SYNOPSIS> 21 / 7 3 > _ * _ 9 > sub { die "later" } sub { die "later" } > _->() Runtime error: later DESCRIPTIONRe-using results is very useful when working in a REPL. With "OutputCache" you get "_", which holds the past result. The benefit is that you can build up your result instead of having to type it in all at once, or store it in intermediate variables. "OutputCache" also provides "$_REPL->output_cache", an array reference of all results in this session.Devel::REPL already has a similar plugin, Devel::REPL::Plugin::History. There are some key differences though:
CAVEATSThe "_" sub is shared across all packages. This means that if a module is using the "_" sub, then there is a conflict and you should not use this plugin. For example, Jifty uses the "_" sub for localization. Jifty is the only known user.SEE ALSO"Devel::REPL", "Devel::REPL::Plugin::History"SUPPORTBugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-REPL> (or bug-Devel-REPL@rt.cpan.org <mailto:bug-Devel-REPL@rt.cpan.org>).There is also an irc channel available for users of this distribution, at "#devel" on "irc.perl.org" <irc://irc.perl.org/#devel-repl>. AUTHORShawn M Moore, "<sartak at gmail dot com>"COPYRIGHT AND LICENSECopyright (C) 2007 by Shawn M MooreThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |