+use strict;
+use warnings;
package Devel::REPL::Plugin::Packages;
use Devel::REPL::Plugin;
-use namespace::clean -except => [ "meta" ];
+use namespace::autoclean;
-use vars qw($PKG_SAVE);
+our $PKG_SAVE;
has 'current_package' => (
isa => 'Str',
my $line = $self->$orig(@args);
# add a BEGIN block to set the package around at the end of the sub
# without mangling the return value (we save it off into a global)
- $line .= '; BEGIN { $Devel::REPL::Plugin::Packages::PKG_SAVE = __PACKAGE__; }';
+ $line .= '
+; BEGIN { $Devel::REPL::Plugin::Packages::PKG_SAVE = __PACKAGE__; }';
return $line;
};
# declare empty scratchpad package for cleanliness
1;
+
+__END__
+
+=head1 NAME
+
+Devel::REPL::Plugin::Packages - Keep track of which package the user is in
+
+=cut
+