Attribute-Default

 view release on metacpan or  search on metacpan

lib/Attribute/Default.pm  view on Meta::CPAN

## import()
##
## Apparently I found it necessary to export 'exsub'
## by hand. I don't know why. Eventually, it may
## be necessary to turn on some specific functionality
## once 'exsub' is exported for compile-time speed.
##
sub import {
  my $class = shift;
  my ($subname) = @_;
  my $callpkg = (caller())[0];

  if (defined($subname) && $subname eq 'exsub') {
    no strict 'refs';
    *{ "${callpkg}::exsub" } = \&exsub;
  }
  else {
    SUPER->import(@_);
  }
    
}



( run in 0.624 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )