diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-23 22:33:28 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-23 23:02:34 -0800 |
commit | 86e39c78d9f3b641ce09c0dce272b8de18133dcb (patch) | |
tree | 2595233218a7e68142daf4eeb39cd3e25db84f20 /dist/B-Deparse | |
parent | ddc6eb271820be9ab4e08c9627bc26c1e28f55c4 (diff) | |
download | perl-86e39c78d9f3b641ce09c0dce272b8de18133dcb.tar.gz |
Deparse.pm: More ->pmflags clean-up
It should run faster with fewer method calls.
Diffstat (limited to 'dist/B-Deparse')
-rw-r--r-- | dist/B-Deparse/Deparse.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm index f87511fcd4..d7a5caacc2 100644 --- a/dist/B-Deparse/Deparse.pm +++ b/dist/B-Deparse/Deparse.pm @@ -4458,7 +4458,8 @@ sub matchop { $kid = $kid->sibling; } my $quote = 1; - my $extended = ($op->pmflags & PMf_EXTENDED); + my $pmflags = $op->pmflags; + my $extended = ($pmflags & PMf_EXTENDED); my $rhs_bound_to_defsv; if (null $kid) { my $unbacked = re_unback($op->precomp); @@ -4478,7 +4479,6 @@ sub matchop { } } my $flags = ""; - my $pmflags = $op->pmflags; $flags .= "c" if $pmflags & PMf_CONTINUE; $flags .= $self->re_flags($op); $flags = join '', sort split //, $flags; @@ -4574,6 +4574,7 @@ sub pp_subst { $kid = $kid->sibling; } my $flags = ""; + my $pmflags = $op->pmflags; if (null($op->pmreplroot)) { $repl = $self->dq($kid); $kid = $kid->sibling; @@ -4583,13 +4584,13 @@ sub pp_subst { $repl = $repl->first; $flags .= "e"; } - if ($op->pmflags & PMf_EVAL) { + if ($pmflags & PMf_EVAL) { $repl = $self->deparse($repl->first, 0); } else { $repl = $self->dq($repl); } } - my $extended = ($op->pmflags & PMf_EXTENDED); + my $extended = ($pmflags & PMf_EXTENDED); if (null $kid) { my $unbacked = re_unback($op->precomp); if ($extended) { @@ -4601,8 +4602,8 @@ sub pp_subst { } else { ($re) = $self->regcomp($kid, 1, $extended); } - $flags .= "r" if $op->pmflags & PMf_NONDESTRUCT; - $flags .= "e" if $op->pmflags & PMf_EVAL; + $flags .= "r" if $pmflags & PMf_NONDESTRUCT; + $flags .= "e" if $pmflags & PMf_EVAL; $flags .= $self->re_flags($op); $flags = join '', sort split //, $flags; $flags = $substwords{$flags} if $substwords{$flags}; |