use constant REDUCE => ($] >= 5.008009 ? \&List::Util::reduce : \&_reduce);
-our $VERSION = '0.003';
+our $VERSION = '0.004';
sub new {
my $class = shift;
no strict 'refs';
- local(*{$caller."::a"}) = \my $x;
- local(*{$caller."::b"}) = \my $y;
+ local (*{"${caller}::a"}, *{"${caller}::b"}) = (\my $x, \my $y);
$x = shift;
- foreach (@_) {
- $y = $_;
+ foreach my $e (@_) {
+ $y = $e;
$x = $code->();
}