In the Method::Workflow module a workflow is a sequence of methods, possibly nested, associated with an object or class, that can be programmatically generated, chained or mixed.
Generally you declare workflow methods as small parts of a greater design. A good example of what this module attempts to achieve is Ruby's RSPEC http://rspec.info. However workflows need not be restricted to testing.
Example workflow (Method::Workflow::Case):
Each 'task' method will be run for each 'case' method
cases example {
my $target;
case a { $target = "case 1" }
case b { $target = "case 2" }
case c { $target = "case 2" }
action display { print "$target\n" }
action display_cap { print uc($target) . "\n" }
}
run_workflow();
Prints:
case 1
CASE 1
case 2
CASE 2
case 3
CASE 3
Product's homepage
Requirements:
· Perl