+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
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';
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';
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};
}
};
}