Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I was thinking something along these lines while in the shower. (Best place to code) :P..

Anywho... Thinking about the problem space, and what is needed, it just felt wholly unPerish to write the same or very similar code time and again.

My actual thought was implementing a group of methods, possibly a seperate Class, which did validation. Then providing it a list of method names which needed to be within the inheritance tree. Something along the lines of maybe
use Validate; ($ok, $err) = $obj->validate( isa => [this, that, theother], can_do => [meth1, meth2, meth3], ); croak $err if (!$ok);
If they existed, then who cares who's calling. Then I thought "What if they override a prerequisite method within their own space"?.. Well if they do, then A) They know what they are doing, hence can use our code or B) They have no clue what they are doing, can't quite figure something out, or are trying to shutgun something together and deserve what ever quirks pop up.

So I haven't really added anything to this thread, so I'm sorry. But I like the post Im replying to and its simplicity, and just wanted to pipe up that its how I was thinking of doing it as well, so an additional ++ to you cause I only have 1 vote for ya.

/* And the Creator, against his better judgement, wrote man.c */

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

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?

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

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (6)
    As of 2015-11-29 18:07 GMT
    Find Nodes?
      Voting Booth?

      What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

      Results (752 votes), past polls