Update Packages so that it won't explode on comments (because the BEGIN block won...
[p5sagit/Devel-REPL.git] / 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 {