Above code for illustrative purposes only. Certaily could be done a lot better/cleaner.sub foo { my $self = shift; die "Get out of my class" unless ref($self); # not called as method die "Get out of my class" unless $self->isa('My::Class'); }
In reply to Re:lock a method or functinoality to class & subclass
by Cabrion
in thread lock a method or functinoality to class & subclass
by nmerriweather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |