I'd like a way for the user to retrieve the versions
This can be done pretty simply. If we use the modules as kcott has written them, then a script could access Monks::Data and output its version like this:
use Monks::Data; print $Monks::Data::VERSION;
There's no real harm in adding a version() method to your module but neither is there any real benefit unless you are inheriting from a superclass and want an easy way for multiple levels of inherited classes all to report the same version, or at least refer to the parent/grandparent version somehow. I'm struggling to think of a use case like this; there probably is one somewhere but it would be a fairly rare occurrence.
In reply to Re^3: OO manner of accessing static variables in a subclass?
by hippo
in thread OO manner of accessing static variables in a subclass?
by HipDeep
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |