App-Pipeline-Simple
view release on metacpan or search on metacpan
=back
Finally, the C<step> tag can contain the C<next> key that
gives an array of IDs for the next steps in the execution. Typically,
these steps depend on the previous step for input.
Practices that are completely bonkers, like spaces in file names, are
not supported.
Finally, it is worth noting that YAML can need escaping and quoting to
get special characters inside strings. Double quotes around a string
works most of the time well. A single quote inside a single quoted
string needs to be doubled.
The following example of a perl one-liner (Thanks to Nic Walker for
alerting me) could be equally well written using double quotes like
this: "'print $F[1]'"
s6:
name: perl
args:
lane: '''print $F[1]'''
in:
type: redir
value: myfile
out:
type: redir
value: sec_column
=head2 Advanced features
The pipeline does not have to be linear; it can contain branches. For
example, the pipeline can have several start points with different
kinds of input: file and string.
Sometimes it is useful to run the same pipeline with different
parameter. The starting point of execution can take a value from the
command line. Leave the value for the given argument blank in the
configuration file and give it from the command line. Matching of
values is done by matching the type string.
spipe -conf input_demo.yml --input=ABC --itype=str
---
description: "Demonstrate input from command line"
name: input.yml
version: '0.1'
steps:
s1:
name: echo
args:
in:
type: unnamed
value:
out:
type: redir
value: s1_string.txt
The empty C<value> will be filled in from the command line into the
C<config.yml> stored in the project directory. Also, the config file
looks slightly different since the steps are written out as
App::Pipeline::Simple objects. Functionally there is no difference.
=head1 TO DO
This pipeline engine has been tested using mostly linear pipelines.
Extensive branching and complex dependencies might not work as expected.
There are no explicit tests for the existence of step input
files. Scripts are expected to run these steps themselves and die
gracefully when appropriate.
There has been no attempt to execute steps in parallel fashion.
If all this is included, this pipeline engine might not be "simple"
any more.
=head1 SEE ALSO
L<App::Pipeline::Simple>
=head1 AUTHOR
Heikki Lehvaslaiho, KAUST (King Abdullah University of Science and Technology).
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Heikki Lehvaslaiho.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
( run in 0.528 second using v1.01-cache-2.11-cpan-39bf76dae61 )