From: Sartak Date: Tue, 6 May 2008 07:57:57 +0000 (+0000) Subject: Update Packages so that it won't explode on comments (because the BEGIN block won... X-Git-Tag: v1.003015~120 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=commitdiff_plain;h=7c7c35c1216e297f82f97dcc0e27a28bc97d4e95;hp=19ba909cb312f706f9275b61c55367298e031fce Update Packages so that it won't explode on comments (because the BEGIN block won't be run) git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4342 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/lib/Devel/REPL/Plugin/Packages.pm b/lib/Devel/REPL/Plugin/Packages.pm index e0b797b..9fb14ba 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 {