do not index these secondary packages - they cannot be loaded independently
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / Packages.pm
index 9fb14ba..064c3fa 100644 (file)
@@ -1,9 +1,14 @@
+use strict;
+use warnings;
 package Devel::REPL::Plugin::Packages;
-use Devel::REPL::Plugin;
+# ABSTRACT: Keep track of which package the user is in
+
+our $VERSION = '1.003027';
 
-use namespace::clean -except => [ "meta" ];
+use Devel::REPL::Plugin;
+use namespace::autoclean;
 
-use vars qw($PKG_SAVE);
+our $PKG_SAVE;
 
 has 'current_package' => (
   isa      => 'Str',
@@ -26,7 +31,8 @@ around 'mangle_line' => sub {
   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;
 };
 
@@ -44,7 +50,8 @@ around 'eval' => sub {
   return $self->$orig(@args);
 };
 
-package Devel::REPL::Plugin::Packages::DefaultScratchpad;
+package # hide from PAUSE
+    Devel::REPL::Plugin::Packages::DefaultScratchpad;
 
 # declare empty scratchpad package for cleanliness