From: nothingmuch Date: Wed, 7 May 2008 07:16:52 +0000 (+0000) Subject: make mangling optional in B::Concise plugin X-Git-Tag: v1.003015~116 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9c3c6bc8dea98cb4955deff23ccb9bae2a2992cd;p=p5sagit%2FDevel-REPL.git make mangling optional in B::Concise plugin git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4353 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/lib/Devel/REPL/Plugin/B/Concise.pm b/lib/Devel/REPL/Plugin/B/Concise.pm index b262164..97ec791 100644 --- a/lib/Devel/REPL/Plugin/B/Concise.pm +++ b/lib/Devel/REPL/Plugin/B/Concise.pm @@ -28,7 +28,9 @@ sub expr_command_concise { 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); @@ -36,7 +38,7 @@ sub expr_command_concise { open my $fh, ">", \my $out; { local *STDOUT = $fh; - B::Concise::compile((split /\s+/, $opts), $sub)->(); + B::Concise::compile(keys %opts, $sub)->(); } return $out;