use B qw(class svref_2object);
$\ = "\n";
my $rand = rand;
$bar = sub { print $rand };
while (1) {
mutate( $bar );
$bar->();
sleep 1;
}
sub mutate {
(svref_2object($_[0])->PADLIST->ARRAY)[1]->object_2svref->[1] = rand
}
####
use B qw(class svref_2object);
use Data::Dumper;
@a = map {
my $k = rand;
sub { print $k }
}
0, 1;
@a =
map
map( [ map +( class($_) ne 'SPECIAL'
? $_->object_2svref
: $_ ),
$_->ARRAY ],
svref_2object($_)->PADLIST->ARRAY ),
@a;
print Dumper( @a );
####
$VAR1 = [
bless( do{\(my $o = 1)}, 'B::SPECIAL' ),
\'$k'
];
$VAR2 = [
[],
\'0.681204496723698'
];
$VAR3 = [
bless( do{\(my $o = 1)}, 'B::SPECIAL' ),
$VAR1->[1]
];
$VAR4 = [
[],
\'0.716383141555951'
];