Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Your introduction on Inside-Out Objects insn't right. You seem mostly concerned with preventing people from bypassing the API and muck directly with the internals. But this is Perl, mucking with internals is allowed, though frowned upon. After all, isn't a common catchphrase for Perl not "stay out of my livingroom because it's the polite thing to do, not because I have a shotgun"?

But the main reason for wanting them is one you don't mention, and it's not such an "esotheric" one as you claim: it is in order to be allowed to subclass any class without having to be aware of any hidden fields that are stored in the parent class, without any risk of trampling all over them, of which, after all, the list may change (grow) over time.

Compared to this, the direct field access and the possibility of mistyping are just minor issues.


In reply to Re: RFR: Inside-out classes - a Class::InsideOut primer by bart
in thread RFR: Inside-out classes - a Class::InsideOut primer by radiantmatrix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found