Forks-Super
view release on metacpan or search on metacpan
lib/Forks/Super/LazyEval/BackgroundArray.pm view on Meta::CPAN
if ($job->{untaint}) {
($data) = $data =~ /(.*)/s;
} elsif (${^TAINT}) {
carp 'Forks::Super::bg_eval/bg_qx(): ',
'Using Data::Dumper for serialization, which cannot ',
"operate on 'tainted' data. Use bg_eval {...} ",
'{untaint => 1} or bg_qx COMMAND, ',
"{untaint => 1} to retrieve the result.\n";
return;
}
my $decoded = eval "$data"; ## no critic (StringyEval)
return $decoded;
}
},
);
# an array that is evaluated in a child process.
# the first time an element of the array is dereferenced,
# retrieve the output from the child,
# waiting for the child to finish if necessary
lib/Forks/Super/LazyEval/BackgroundScalar.pm view on Meta::CPAN
if ($job->{untaint}) {
($data) = $data =~ /(.*)/s;
} elsif (${^TAINT}) {
carp 'Forks::Super::bg_eval/bg_qx(): ',
'Using Data::Dumper for serialization, which cannot ',
"operate on 'tainted' data. Use bg_eval {...} ",
'{untaint => 1} or bg_qx COMMAND, ',
"{untaint => 1} to retrieve the result.\n";
return;
}
my $decoded = eval "$data"; ## no critic (StringyEval)
return $decoded;
}
},
);
# a scalar reference that is evaluated in a child process.
# when the value is dereferenced, retrieve the output from
# the child, waiting for the child to finish if necessary
sub new {
( run in 0.236 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )