summaryrefslogtreecommitdiff
path: root/ext/B
diff options
context:
space:
mode:
Diffstat (limited to 'ext/B')
-rw-r--r--ext/B/B/C.pm2
-rw-r--r--ext/B/B/Deparse.pm4
-rw-r--r--ext/B/B/Stash.pm2
-rw-r--r--ext/B/NOTES4
-rw-r--r--ext/B/O.pm4
5 files changed, 9 insertions, 7 deletions
diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm
index 6e3af0d5bc..fa1053f1e1 100644
--- a/ext/B/B/C.pm
+++ b/ext/B/B/C.pm
@@ -1576,6 +1576,8 @@ No copy-on-grow.
Optimisation level (n = 0, 1, 2, ...). B<-O> means B<-O1>. Currently,
B<-O1> and higher set B<-fcog>.
+=back
+
=head1 EXAMPLES
perl -MO=C,-ofoo.c foo.pl
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm
index be7088e768..f8bcc7c8df 100644
--- a/ext/B/B/Deparse.pm
+++ b/ext/B/B/Deparse.pm
@@ -1194,7 +1194,7 @@ BEGIN {
sub deparse_binop_left {
my $self = shift;
my($op, $left, $prec) = @_;
- if ($left{assoc_class($op)}
+ if ($left{assoc_class($op)} && $left{assoc_class($left)}
and $left{assoc_class($op)} == $left{assoc_class($left)})
{
return $self->deparse($left, $prec - .00001);
@@ -1227,7 +1227,7 @@ BEGIN {
sub deparse_binop_right {
my $self = shift;
my($op, $right, $prec) = @_;
- if ($right{assoc_class($op)}
+ if ($right{assoc_class($op)} && $right{assoc_class($right)}
and $right{assoc_class($op)} == $right{assoc_class($right)})
{
return $self->deparse($right, $prec - .00001);
diff --git a/ext/B/B/Stash.pm b/ext/B/B/Stash.pm
index d992a89af8..fca3443c13 100644
--- a/ext/B/B/Stash.pm
+++ b/ext/B/B/Stash.pm
@@ -4,7 +4,7 @@ package B::Stash;
BEGIN { %Seen = %INC }
-STOP {
+CHECK {
my @arr=scan($main::{"main::"});
@arr=map{s/\:\:$//;$_;} @arr;
print "-umain,-u", join (",-u",@arr) ,"\n";
diff --git a/ext/B/NOTES b/ext/B/NOTES
index 8309892d80..89d03ba9a2 100644
--- a/ext/B/NOTES
+++ b/ext/B/NOTES
@@ -161,8 +161,8 @@ O module
it should return a sub ref (usually a closure) to perform the
actual compilation. When O regains control, it ensures that the
"-c" option is forced (so that the program being compiled doesn't
- end up running) and registers a STOP block to call back the sub ref
+ end up running) and registers a CHECK block to call back the sub ref
returned from the backend's compile(). Perl then continues by
parsing prog.pl (just as it would with "perl -c prog.pl") and after
- doing so, assuming there are no parse-time errors, the STOP block
+ doing so, assuming there are no parse-time errors, the CHECK block
of O gets called and the actual backend compilation happens. Phew.
diff --git a/ext/B/O.pm b/ext/B/O.pm
index d07c4a5b0f..352f8d4206 100644
--- a/ext/B/O.pm
+++ b/ext/B/O.pm
@@ -11,7 +11,7 @@ sub import {
my $compilesub = &{"B::${backend}::compile"}(@options);
if (ref($compilesub) eq "CODE") {
minus_c;
- eval 'STOP { &$compilesub() }';
+ eval 'CHECK { &$compilesub() }';
} else {
die $compilesub;
}
@@ -59,7 +59,7 @@ C<B::Backend> module and calls the C<compile> function in that
package, passing it OPTIONS. That function is expected to return
a sub reference which we'll call CALLBACK. Next, the "compile-only"
flag is switched on (equivalent to the command-line option C<-c>)
-and a STOP block is registered which calls CALLBACK. Thus the main
+and a CHECK block is registered which calls CALLBACK. Thus the main
Perl program mentioned on the command-line is read in, parsed and
compiled into internal syntax tree form. Since the C<-c> flag is
set, the program does not start running (excepting BEGIN blocks of