- or download this
sub foo
{
my ($self) = @_;
croak "..." unless ref($self) && $self->isa("AnInterface")
}
- or download this
use base qw(AnInterface AnotherInterface YetAnotherInterface);
...
my $self = shift;
... code ...
};
- or download this
sub foo # requires interfaces InterfaceA, InterfaceB
{
...
InterfaceA::validate($self);
InterfaceB::validate($self);
}