Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

For the most part, I agree with your assessment of the problem. However, I don't know that I agree with your solution because your solution attempts to deal with fundamental problems in Perl's OO model. Here are my thoughts.

First, programmers tend not to worry about these issues (and are less likely to encounter them) if they're building small systems. If they're building large systems, those programmers had durn well better know about those issues.

Second, I don't believe it is appropriate for programmers to attempt building large systems without a test suite. A good test suite will nail problems like this. If you find a bug, you add a test. This might seem to be irrelevant to your concerns, but I've found that with tests, while I write better code, I also worry less about constructs that I previously would have avoided due to apparent fragility.

Third, these issues are, of course, exacerbated when multiple inheritance is used, but programmers should usually be be delegating instead of inheriting. If UNIVERSAL::AUTOLOAD is searching a huge inheritance heirarchy, I submit that the system probably has some design issues. Scalability in Perl should usually not be achieved via complicated inheritance heirarchies. That's begging for trouble. Abigail's inside out objects can help, as can lexically scoped subs for private methods (my $sub = sub foo{};) and traits, but the reality is, Perl's OO has some quirks that people should be paying attention to. can seems to be pretty far down the list.

Cheers,
Ovid

New address of my CGI Course.


In reply to Re: Why breaking can() is acceptable by Ovid
in thread Why breaking can() is acceptable by tilly

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • 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 perusing the Monastery: (9)
    As of 2024-09-13 15:16 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The PerlMonks site front end has:





      Results (21 votes). Check out past polls.

      Notices?
      erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.