X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FPackages.pm;h=14c0f60e000650a36084466348c86d242e62e0ec;hp=e0b797b6d1f42a2c9dca2f71198078b06b846a6e;hb=c015ad3bfc3be7f3d1c377b5ce2491ab789e7277;hpb=9cfc1536ce713631d93a1d4d11259d1103fb9cae diff --git a/lib/Devel/REPL/Plugin/Packages.pm b/lib/Devel/REPL/Plugin/Packages.pm index e0b797b..14c0f60 100644 --- a/lib/Devel/REPL/Plugin/Packages.pm +++ b/lib/Devel/REPL/Plugin/Packages.pm @@ -33,7 +33,7 @@ around 'mangle_line' => sub { after 'execute' => sub { my ($self) = @_; # if we survived execution successfully, save the new package out the global - $self->current_package($PKG_SAVE); + $self->current_package($PKG_SAVE) if defined $PKG_SAVE; }; around 'eval' => sub { @@ -49,3 +49,12 @@ package Devel::REPL::Plugin::Packages::DefaultScratchpad; # declare empty scratchpad package for cleanliness 1; + +__END__ + +=head1 NAME + +Devel::REPL::Plugin::Packages - Keep track of which package the user is in + +=cut +