I don't have this module installed on my machine, so I can't test this, but what's wrong with calling the public constructor for Time::Piece from within the constructor of your subclass (thereby providing an instance to _mktime), and then reblessing the reference returned into your current package? You can do as much further initialization at that point as you want to without overriding the "private" method _mktime. It's worth noting as well that unless the documentation explicitly guards against it, you're perfectly free to interpret this as a "protected" method, which as a subclass your module may legitimately override.
Also, as long as the module containing the procedures (same as "functions"?) you need is in your ISA array, you won't need to do any manual traversal; this is automatically done in a leftmost, depth-first search of base classes when the method/function is not found in the current module. Now, granted, if they're functions then they'll expect to be called on a class name, not on a reference to a class instance, so your callers would need to call ref($yoursubclass)->somesub(), unless you intend to override all of these public methods as in
But that would be a lot of redundant code. Perhaps I'm not following this part of your discussion.sub somesub { my ($this, $args) = @_; ref($this)->SUPER::somesub($args); }
In reply to Re: Tracking Inheritance Directly due to Hybrid Methods
by djantzen
in thread Tracking Inheritance Directly due to Hybrid Methods
by mojotoad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |