use namespace::clean -except => [ 'meta' ];
-with qw(Devel::REPL::Plugin::Turtles);
+sub BEFORE_PLUGIN {
+ my $self = shift;
+ $self->load_plugin('Turtles');
+}
sub AFTER_PLUGIN {
my $self = shift;
die unless $code;
- my $sub = $self->compile($code, no_mangling => 1);
+ my %opts = map { $_ => 1 } (split /\s+/, $opts);
+
+ my $sub = $self->compile($code, no_mangling => !delete($opts{"-mangle"}) );
if ( $self->is_error($sub) ) {
return $self->format($sub);
open my $fh, ">", \my $out;
{
local *STDOUT = $fh;
- B::Concise::compile((split /\s+/, $opts), $sub)->();
+ B::Concise::compile(keys %opts, $sub)->();
}
return $out;
optrees of expressions.
The code is not actually executed, which means that when used with
-L<Deve::REPL::Plugin::OutputCache> there is .
+L<Deve::REPL::Plugin::OutputCache> there is no new value in C<_>.
The command takes the same options as L<B::Concise/compile>, e.g. C<-basic> or
C<-exec> to determine the dump order, C<-debug>, C<-concise> and C<-terse> to