Acme-Class-Std
view release on metacpan or search on metacpan
my $count = "ACME";
my %enhanced;
my $all = 0;
sub import {
$enhanced{+caller}++;
goto &Class::Std::import;
}
sub ID ($) {
my ($package, undef, undef, $sub) = caller 1;
if ($sub eq 'Class::Std::new' && $_[0]->isa('SCALAR')
&& ($all || $enhanced{ref $_[0]})) {
# Strangely, it seems that one can dup an unopened file handle without
# warnings.
eval "open $count, '<&dead'";
my $ref = *{delete $Acme::Class::Std::{$count++}}{IO};
$_[0] = bless $ref, ref $_[0];
}
goto &Scalar::Util::refaddr;
}
( run in 3.407 seconds using v1.01-cache-2.11-cpan-d80b1682f3f )