Devel::REPL::Plugin::LazyLoad - Lazily load packages into your REPL
# repl.rc $_REPL->load_plugin('LazyLoad'); $_REPL->lazy_load('File::Slurp' => qw/read_file write_file/); # for # Exporter-style # modules $_REPL->lazy_load('DateTime'); # for OO-style modules
This plugin for Devel::REPL allows you to lazily load certain modules into your REPL as you use them. Let's say you end up using DateTime math in your REPL 50% of the time. Put the following into your
Tells the REPL to lazily load a module. If no import list is specified,
$module is treated as an "OO-style" module (ex. DateTime, where you call methods on the class rather than use exported functions). If an import list is specified, each function in the import list is created in the current package and will load
$module when invoked.
my $class = 'DateTime'; $class->newwill not work.
DateTime::->newwill not work.
Exported symbols that are not specified in the call to import will not work.
Prototypes for exported functions may be messed up until they are actually imported into the REPL.
Rob Hoelz <firstname.lastname@example.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Rob Hoelz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Please report any bugs or feature requests on the bugtracker website https://github.com/hoelzro/devel-repl-plugin-lazyload/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.