Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
IMO, what you're wanting to do is contrary to Perl's model of OO.
In a nutshell, if a method can be called on an object, you should allow it, without enforcing specific class inheritance relationships. "Interfaces" in Perl are implicit.
You might, of course, want to do extra type-checking on the arguments, as a way of getting polymorphism..

jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.


In reply to Re: OO-style modifiers for 'sub' ? by jdporter
in thread OO-style modifiers for 'sub' ? by Gilimanjaro

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
    Chatterbox?
    Discipulus will now go afk due to a splunk refreshment session..
    [choroba]: Pippy loves Splunk

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (4)
    As of 2017-02-21 08:25 GMTServer Error (Error ID 7820012c60600)

    An error has occurred. The site administrators have been notified of the problem and will likely soon fix it. We thank you, for you're patients.

    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Before electricity was invented, what was the Electric Eel called?






      Results (308 votes). Check out past polls.