Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Description

The Data::Flow module allows you to specify a hash of "recipes" that fetch or manipulate data. Each recipe has a name (the hash key), which you can use to set the input or fetch the output value of the recipe using the Data::Flow set and get methods. A recipe can depend on other prerequisite recipes, which means that the input of one recipe can be taken from the output of other recipes. You can use this to create a hierarchy (or other structure) of dependent recipes. The cool thing is that you then call for a specific type of output, and the data flows from its input recipes through all of the dependent recipes to your output, without you having to code the calling structure directly. This allows for a lot of flexibility, because you can manipulate your calling structure by changing your hash recipes and dependencies, not by having to find all of the places that subroutine X is called in your code.

Why should you use it?

The Data::Flow module would be especially appropriate if your data can be processed in a lot of complicated and inter-related ways, and you want a lot of flexibility in how you'll want it processed, now or in the future.

Why should you NOT use it?

For straightforward processing of your data, the recipe structure of Data::Flow can be overkill. It's not as intuitively obvious as just hacking the code.

Related Modules

The C::Scan module uses the Data::Flow module. (Both were written by Ilya.)

Example

The Data::Flow documentation provides an okay example, but looking at the C::Scan module will teach you more about using Data::Flow powerfully.

In reply to Data::Flow by knight

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?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (8)
    As of 2020-07-03 14:12 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?