When I need abstract methods, I usually do:
Same general principle, but I think it's a little cleaner.sub some_abstract_method { __abstract($_[0], caller); # ... } sub __abstract { my ($thing, $pkg, $file, $line) = @_; return if $thing ne __PACKAGE__; my $func = (caller 1)[3]; die "$func is abstract; in $file line $line\n"; }
In reply to Re: Abstract Packages
by japhy
in thread Abstract Packages
by Velaki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |