- or download this
{
package Foo;
...
# autoloads foo()
# autoloads bar()
}
- or download this
my $code = $obj->can('foo');
$obj->$code(...)
- or download this
$obj->foo(...)
- or download this
AUTOLOAD {
...;
...
croak("No method $method ...");
}
}
- or download this
AUTOLOAD {
...;
...
croak("No method $method ...");
}
}
- or download this
AUTOLOAD {
my $self = $_[0]; # Not shift, using goto.
...
croak(...);
}
}
- or download this
sub can {
my ($self, $method) = @_; # Not shift, using goto.
...
return $universal; # May be undefined.
}
- or download this
use Class::AUTOCAN sub {
my $self = shift;
...
return;
};
- or download this
Class::AUTOCAN->install(
target => $pkg,
code => sub { ... },
);