Test-Resub

 view release on metacpan or  search on metacpan

lib/Test/Resub.pm  view on Meta::CPAN


our @EXPORT = qw(resub bulk_resub);

our $VERSION = 2.03;

use Carp qw(croak);
use Storable qw(dclone);
use Scalar::Util qw(weaken);

sub default_replacement_sub { sub {} }
sub set_prototype(&$) {
  if (_implements('Scalar::Util','set_prototype')) {
    goto \&Scalar::Util::set_prototype;
  } else {
    my $code = shift;
    my $proto = shift;
    $proto = defined $proto ? "($proto)" : '';
    local $@;
    return eval "sub $proto { goto \$code }";
  }
}



( run in 0.746 second using v1.01-cache-2.11-cpan-49f99fa48dc )