in reply to Re: Mixing OO & non OO code in a module
in thread Mixing OO & non OO code in a module
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__); ... }
|
|---|