I can't help thinking that if you return an object representing the results of one set of manipulations performed on one set of data, and the user passes this back to you via a call to manipulate a completly different set of data, you have an unresolvable problem?
I don't really see this a being a problem. This is no different from user passing in the wrong file name to a call.

Some manipulations might require other stages to be performed first and that can be tested for.
If the user passes the wrong object that passes all tests, there isn't much I can do about it - I'd hope the user knows what order they want to do things in.

I can't think of any neat way of taking this away from the user, and honestly don't see any need to do so.
Simplifying the representation of the file(s) to process is probably all I need.


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.


In reply to Re: Re: Tracking processing by returning objects? by BazB
in thread Tracking processing by returning objects? by BazB

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, details, 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, summary, 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.