From: matthewt Date: Mon, 25 Feb 2008 20:19:53 +0000 (+0000) Subject: 1.002001 X-Git-Tag: v1.003015~135 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=commitdiff_plain;h=6edfdc075bf84142924281bafdd9f75f08a9b93d 1.002001 git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4101 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/Changes b/Changes index 9ee2066..870eb94 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,7 @@ +1.2.1 + - ship a working version of 1.2.0 1.2.0 + - fix Plugin to work with latest Moose - deprecate NewlineHack plugin, cause fixed in REPL.pm - OutputCache plugin - MultiLine::PPI plugin diff --git a/Makefile.PL b/Makefile.PL index 93c9210..fa92208 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -8,7 +8,7 @@ all_from 'lib/Devel/REPL.pm'; install_script 'script/re.pl'; build_requires 'Test::More'; -requires 'Moose'; +requires 'Moose' => '0.38'; requires 'MooseX::Object::Pluggable' => '0.0007'; requires 'MooseX::Getopt'; requires 'namespace::clean'; diff --git a/lib/Devel/REPL.pm b/lib/Devel/REPL.pm index b11d9fb..6b1f11d 100644 --- a/lib/Devel/REPL.pm +++ b/lib/Devel/REPL.pm @@ -5,7 +5,7 @@ use Moose; use namespace::clean -except => [ 'meta' ]; use 5.8.1; # might work with earlier perls but probably not -our $VERSION = '1.002000'; # 1.2.0 +our $VERSION = '1.002001'; # 1.2.1 with 'MooseX::Object::Pluggable'; diff --git a/lib/Devel/REPL/Plugin/Commands.pm b/lib/Devel/REPL/Plugin/Commands.pm index 1b43106..953009c 100644 --- a/lib/Devel/REPL/Plugin/Commands.pm +++ b/lib/Devel/REPL/Plugin/Commands.pm @@ -26,18 +26,24 @@ sub AFTER_PLUGIN { after 'setup_commands' => sub { my ($self) = @_; weaken($self); - $self->command_set->{load_plugin} = sub { $self->load_plugin(@_); }; + $self->command_set->{load_plugin} = sub { + my $self = shift; + sub { $self->load_plugin(@_); }; + }; }; sub command_installer { my ($self) = @_; - my %command_set = %{$self->command_set}; + my $command_set = $self->command_set; + my %command_subs = map { + ($_ => $command_set->{$_}->($self)); + } keys %$command_set; return sub { my $package = shift; - foreach my $command (keys %command_set) { + foreach my $command (keys %command_subs) { no strict 'refs'; no warnings 'redefine'; - *{"${package}::${command}"} = $command_set{$command}; + *{"${package}::${command}"} = $command_subs{$command}; } }; }