summaryrefslogtreecommitdiff
path: root/ext/B/B
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2017-03-26 15:26:22 +0200
committerSawyer X <xsawyerx@cpan.org>2017-06-01 13:33:43 +0200
commit6b57559b3d5389dc65364f9910d81b3e8b08e144 (patch)
tree3db80f5b457b570322e181c1007d9ab089f2f8f8 /ext/B/B
parent85cd139f4d2f28f6c63b74dbfc66ce47c6f8a324 (diff)
downloadperl-6b57559b3d5389dc65364f9910d81b3e8b08e144.tar.gz
Improve error message for bogus -MO=… arguments
Commit 7a9b44b9 expanded the scope of the string eval that loads the B::* backend module, but didn't move the $@ check and croak to outside it. Restore it and further improve the error message. Before: $ perl -MO=Concise=-debug -e1 syntax error at (eval 2) line 18, near "=" BEGIN failed--compilation aborted. After: $ ./perl -Ilib -MO=Concise=-debug -e1 Loading compiler backend 'B::Concise=-debug' failed: syntax error at (eval 2) line 18, near "=" at -e line 0. BEGIN failed--compilation aborted.
Diffstat (limited to 'ext/B/B')
-rw-r--r--ext/B/B/Concise.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm
index 315e00a4b6..e5f1066281 100644
--- a/ext/B/B/Concise.pm
+++ b/ext/B/B/Concise.pm
@@ -14,7 +14,7 @@ use warnings; # uses #3 and #4, since warnings uses Carp
use Exporter (); # use #5
-our $VERSION = "0.999";
+our $VERSION = "1.000";
our @ISA = qw(Exporter);
our @EXPORT_OK = qw( set_style set_style_standard add_callback
concise_subref concise_cv concise_main
@@ -1103,7 +1103,7 @@ sub tree {
# to update the corresponding magic number in the next line.
# Remember, this needs to stay the last things in the module.
-my $cop_seq_mnum = 16;
+my $cop_seq_mnum = 12;
$cop_seq_base = svref_2object(eval 'sub{0;}')->START->cop_seq + $cop_seq_mnum;
1;