Skip Menu |

This queue is for tickets about the DataFlow CPAN distribution.

Report information
The Basics
Id: 68856
Status: patched
Priority: 0/
Queue: DataFlow

People
Owner: RUSSOZ [...] cpan.org
Requestors: RUSSOZ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: use DataFlow::Item to carry data AND metadata
possible features: ... autoboxing of data into an Item? ... autofilling some metadata through the flow?
 Work in progress
 
Keeping DataFlow::Proc unaware of the item and metadata for the moment.

DataFlow::Item will carry the data and metada, and it will be a simple value-object.

DataFlow::Channel (for lack of a better name right now) will be a 'glue' between DataFlow and its processors. A Channel will manage the input and output channels of a running processor. This should NOT break the existing code, it should happen all transparently.

DataFlow will have to be adapted, mostly regarding the output method. It must allow to return the array of DataFlow::Items, for those interested, or a default output bringing only one specific channel (or 'default' channel if none is specified).
 Every Proc in a DataFlow is now wrapped with a ProcWrapper object. This object handles the DataFlow::Item manipulation.

There is some code in place for metadata handling, but it is not accessible to procs yet.

the future idea is to allow procs to have one (or more, as needed) additional methods to fuss in metadata before and/or after handling the data itself.

another fuzzy point is how to handle DataFlow::Item objects when the Proc returns undef. First approach was to wrap undef in Item, as any regular value, but for the time being we have two different tests in place to discard undef values (one in ProcWrapper the other in DataFlow itself)