If you're doing inheritance, you'd need something more involved, but you get the idea.sub function { # Allow calling as a subroutine or class method shift if ($_[0] eq __PACKAGE__); ... }
In reply to Re^2: Mixing OO & non OO code in a module
by jdhedden
in thread Mixing OO & non OO code in a module
by spatterson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |