in reply to Re^2: Calling module function from within a blessed module
in thread Calling module function from within a blessed module
Note that this unfortunately breaks for subclasses.
This is true. Thanks for pointing that out, so I don't have to do that ;)
The OP was really about calling syntax, and I sneaked in dual subs (method/function) and the __PACKAGE__ keyword, just to have that mentioned. Now you bring on subclassing, which is great - and a big field to tackle. Yes, the check for __PACKAGE__ is suitable for classes which aren't meant to be subclassed, won't be, or "I don't care about" modules, and more so: which strictly forbid subclassing.
Your post is right, mine wasn't wrong, and from here we can go on exploring the whole perl OO fractal landscape... ;)
|
|---|