in reply to Re^4: OO manner of accessing static variables in a subclass?
in thread OO manner of accessing static variables in a subclass?

I should have pointed you to this documentation earlier: "perlootut - Object-Oriented Programming in Perl Tutorial".

Under Inheritance, you'll find "is-a"; under Composition, you'll find "has-a"; "needs-a" is not mentioned.

It sounds like your constructor should perhaps be more like: new(mode => $mode, data => $data); and you want a method like: is_file_mode().

— Ken

Replies are listed 'Best First'.
Re^6: OO manner of accessing static variables in a subclass?
by HipDeep (Acolyte) on Aug 11, 2016 at 19:11 UTC

    I did read the ootut, along with a lot of other tuts. :) I think I need to go back and re-read them now that I've got my hands quite a bit dirtier, and along with yours and the other monks' patient instruction, hopefully more of it will sink in.

    In regards to the code itself, I'm close to finishing the cleanup, after which I will write the documentation, and post for review. At that point what I'm up to should be clear, and hopefully y'all can (gently) let me know about all of the millions of mistakes I'm sure I made. :)

    Meantime, I got the data class cleaned up in the manner you described, and it's working with the main class just fine, so I feel that I've not only accomplished something, but learned some things as well, so thanks again!

Re^6: OO manner of accessing static variables in a subclass?
by Anonymous Monk on Aug 11, 2016 at 10:41 UTC