$op->$method($level);
$ppname = $op->name;
if ($ppname =~
- /^(or|and|mapwhile|grepwhile|entertry|range|cond_expr)$/)
+ /^(d?or(assign)?|and(assign)?|mapwhile|grepwhile|entertry|range|cond_expr)$/)
{
print $prefix, uc($1), " => {\n";
walkoptree_exec($op->other, $method, $level + 1);
package B::Concise;
-# Copyright (C) 2000, 2001 Stephen McCamant. All rights reserved.
+# Copyright (C) 2000-2002 Stephen McCamant. All rights reserved.
# This program is free software; you can redistribute and/or modify it
# under the same terms as Perl itself.
last if $opsseen{$$op}++;
push @$targ, $op;
my $name = $op->name;
- if ($name
- =~ /^(or|and|(map|grep)while|entertry|range|cond_expr)$/) {
+ if (class($op) eq "LOGOP") {
my $ar = [];
push @$targ, $ar;
push @todo, [$op->other, $ar];
require './test.pl';
}
-plan tests => 4;
+plan tests => 5;
require_ok("B::Concise");
is($op_base_p1, 2, "Second-smallest OP sequence number");
is($cop_base, 1, "Smallest COP sequence number");
+
+# test that with -exec B::Concise navigates past logops (bug #18175)
+
+$out = runperl(
+ switches => ["-MO=Concise,-exec"],
+ prog => q{$a//=$b && print q/foo/},
+ stderr => 1,
+);
+
+like($out, qr/"foo"/, "-exec option with //=");