in reply to Re^4: How to completely destroy class attributes with Test::Most?
in thread How to completely destroy class attributes with Test::Most?

For instance variables, that is, the keys in the blessed anonymous hash that you are using to store your instance data, a leading underscore more usefully indicates "private from subclasses" since all of an object's implementation is supposed to be encapsulated behind methods. So there is a convention, but it is a different convention from method names, where the leading underscore indicates that a method is not part of the external API.

  • Comment on Re^5: How to completely destroy class attributes with Test::Most?

Replies are listed 'Best First'.
Re^6: How to completely destroy class attributes with Test::Most?
by nysus (Parson) on Aug 26, 2019 at 04:23 UTC

    OK, I think I got you. So since my chained classes basically all work together to essentially create one object across many classes, there really is not need to flag them as private from one class to another.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks