Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: pluggable/dynamic data processing/munging/transforming module?

by rwstauner (Acolyte)
on Jan 07, 2011 at 19:36 UTC ( #881152=note: print w/replies, xml ) Need Help??

in reply to pluggable/dynamic data processing/munging/transforming module?

Thanks to everyone for their thoughts.

The short version: After trying to adapt a few existing modules I ended up abstracting my own: Sub::Chain. It needs some work, but is doing what I need so far.

The long version: (an excerpt from the POD)


This module started out as Data::Transform::Named, a named wrapper (like Sub::Chain::Named) around Data::Transform (and specifically Data::Transform::Map).

As the module was nearly finished I realized I was using very little of Data::Transform (and its documentation suggested that I probably wouldn't want to use the only part that I was using). I also found that the output was not always what I expected. I decided that it seemed reasonable according to the likely purpose of Data::Transform, and this module simply needed to be different.

So I attempted to think more abstractly and realized that the essence of the module was not tied to data transformation, but merely the succession of simple subroutine calls.

I then found and considered Sub::Pipeline but needed to be able to use the same named subroutine with different arguments in a single chain, so it seemed easier to me to stick with the code I had written and just rename it and abstract it a bit further.

I also looked into Rule::Engine which was beginning development at the time I was searching. However, like Data::Transform, it seemed more complex than what I needed. When I saw that Rule::Engine was using (the very excellent) Moose I decided to pass since I was doing work on a number of very old machines with old distros and old perls and constrained resources. Again, it just seemed to be much more than what I was looking for.


As for the "parse" method in my original idea/example, I haven't found that to be necessary, and am currently using syntax like

$chain->append($sub, \@arguments, \%options)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://881152]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2018-04-20 21:16 GMT
Find Nodes?
    Voting Booth?