Functional-Utility

 view release on metacpan or  search on metacpan

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

use base qw(Exporter);
our @EXPORT = qw(resub bulk_resub);

our $VERSION = 2.02;

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 1.401 second using v1.01-cache-2.11-cpan-49f99fa48dc )