|P is for Practical|
Re: pluggable/dynamic data processing/munging/transforming module?by rwstauner (Acolyte)
|on Jan 07, 2011 at 19:36 UTC||Need Help??|
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)=head1 RATIONALE
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.=cut
As for the "parse" method in my original idea/example, I haven't found that to be necessary, and am currently using syntax like