$ops{$_} = 'list' for qw/padav/;
$ops{$_} = 'list' for qw/padhv rv2hv/;
$ops{$_} = 'list' for qw/padany flip match entereval readline/;
-$ops{stat} = 13;
+$ops{stat} = { 0 => 0.5, 13 => 0.5 };
$ops{caller} = sub { my @a = caller 0; scalar @a }->();
$ops{localtime} = do { my @a = localtime; scalar @a };
$ops{gmtime} = do { my @a = gmtime; scalar @a };
my $n = name($op);
my $meth = $self->can('pp_' . $n);
return $self->$meth($op) if $meth;
- return $ops{$n} => 0 if exists $ops{$n};
+ if (exists $ops{$n}) {
+ my $r = $ops{$n};
+ $r = { %$r } if ref $r eq 'HASH';
+ return $r => 0;
+ }
if ($op->flags & OPf_KIDS) {
my @res = (0);
use strict;
use warnings;
-use Test::More tests => 54;
+use Test::More tests => 53;
use Sub::Nary;
[ sub { return -f $0, -r $0 }, 2 ],
- [ sub { return stat $0 }, 13 ],
[ sub { return caller 0 }, sub { my @a = caller 0; scalar @a }->() ],
[ sub { return localtime }, do { my @a = localtime; scalar @a } ],
[ sub { return gmtime }, do { my @a = gmtime; scalar @a } ],
use strict;
use warnings;
-use Test::More tests => 40;
+use Test::More tests => 39;
use Sub::Nary;
[ sub { -f $0, -r $0 }, 2 ],
- [ sub { stat $0 }, 13 ],
[ sub { caller 0 }, sub { my @a = caller 0; scalar @a }->() ],
[ sub { localtime }, do { my @a = localtime; scalar @a } ],
[ sub { gmtime }, do { my @a = gmtime; scalar @a } ],
use strict;
use warnings;
-use Test::More tests => 15;
+use Test::More tests => 16;
use Sub::Nary;
[ \&retinif, { 2 => 1 } ],
- [ sub { <*.*> }, { list => 1 / 3, 1 => 2 / 3 } ],
+ [ sub { <*.*> }, { list => 1 / 3, 1 => 2 / 3 } ],
+ [ sub { stat $0 }, { 0 => 0.5, 13 => 0.5 } ],
);
my $i = 1;