$modifier_table->{after},
$modifier_table->{around},
);
+ my $c;
if (@$before && @$after) {
$modifier_table->{cache} = sub {
- $_->(@_) for @{$before};
+ for $c (@$before) { $c->(@_) };
my @rval;
((defined wantarray) ?
((wantarray) ?
($rval[0] = $around->{cache}->(@_)))
:
$around->{cache}->(@_));
- $_->(@_) for @{$after};
+ for $c (@$after) { $c->(@_) };
return unless defined wantarray;
return wantarray ? @rval : $rval[0];
}
}
elsif (@$before && !@$after) {
$modifier_table->{cache} = sub {
- $_->(@_) for @{$before};
+ for $c (@$before) { $c->(@_) };
return $around->{cache}->(@_);
}
}
($rval[0] = $around->{cache}->(@_)))
:
$around->{cache}->(@_));
- $_->(@_) for @{$after};
+ for $c (@$after) { $c->(@_) };
return unless defined wantarray;
return wantarray ? @rval : $rval[0];
}