summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-12-06 06:44:39 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-12-06 16:33:46 -0800
commite16ceb947247b907a9667efc72fbcaf5592060ad (patch)
tree14472ddb15effc552f65f8178f899ade9295b4c8 /lib
parent805a41049b3be490884c9da3008b0e2d50d35a1e (diff)
downloadperl-e16ceb947247b907a9667efc72fbcaf5592060ad.tar.gz
Deparse.pm:pp_entersub: Refactor repetition away
I’m about to modify this code, and having two copies of the join(...) is not so helpful.
Diffstat (limited to 'lib')
-rw-r--r--lib/B/Deparse.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index d09591466d..cbbb6c2dfe 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -4164,12 +4164,12 @@ sub pp_entersub {
}
my $args;
+ my $listargs = 1;
if ($declared and defined $proto and not $amper) {
($amper, $args) = $self->check_proto($proto, @exprs);
- if ($amper eq "&") {
- $args = join(", ", map($self->deparse($_, 6), @exprs));
- }
- } else {
+ $listargs = $amper;
+ }
+ if ($listargs) {
$args = join(", ", map($self->deparse($_, 6), @exprs));
}
if ($prefix or $amper) {