Update Packages so that it won't explode on comments (because the BEGIN block won...
Sartak [Tue, 6 May 2008 07:57:57 +0000 (07:57 +0000)]
git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4342 bd8105ee-0ff8-0310-8827-fb3f25b6796d

lib/Devel/REPL/Plugin/Packages.pm

index e0b797b..9fb14ba 100644 (file)
@@ -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 {