use Exporter (); # use #5
-our $VERSION = "0.80";
+our $VERSION = "0.81";
our @ISA = qw(Exporter);
our @EXPORT_OK = qw( set_style set_style_standard add_callback
concise_subref concise_cv concise_main
walk_topdown($kid, $sub, $level + 1);
}
}
- elsif (class($op) eq "PMOP") {
+ if (class($op) eq "PMOP") {
my $maybe_root = $op->pmreplroot;
if (ref($maybe_root) and $maybe_root->isa("B::OP")) {
# It really is the root of the replacement, not something
}
use OptreeCheck;
use Config;
-plan tests => 2;
+plan tests => 3;
SKIP: {
skip "no perlio in this build", 1 unless $Config::Config{useperlio};
strip_open_hints => 1,
expect => $t, expect_nt => $nt);
-__END__
+checkOptree ( name => 'PMOP children',
+ code => sub { $foo =~ s/(a)/$1/ },
+ strip_open_hints => 1,
+ expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
+# 6 <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->6
+# 1 <;> nextstate(main 1 -e:1) v:{ ->2
+# 3 </> subst(/"(a)"/ replstart->4) KS ->6
+# - <1> ex-rv2sv sKRM/1 ->3
+# 2 <#> gvsv[*foo] s ->3
+# 5 <|> substcont(other->3) sK/1 ->(end)
+# - <1> ex-rv2sv sK/1 ->5
+# 4 <#> gvsv[*1] s ->5
+EOT_EOT
+# 6 <1> leavesub[1 ref] K/REFC,1 ->(end)
+# - <@> lineseq KP ->6
+# 1 <;> nextstate(main 1 -e:1) v:{ ->2
+# 3 </> subst(/"(a)"/ replstart->4) KS ->6
+# - <1> ex-rv2sv sKRM/1 ->3
+# 2 <$> gvsv(*foo) s ->3
+# 5 <|> substcont(other->3) sK/1 ->(end)
+# - <1> ex-rv2sv sK/1 ->5
+# 4 <$> gvsv(*1) s ->5
+EONT_EONT
+__END__