NAME

Workflow::Aline - a modular staging framework

CONCEPT

 File3
      robot1 robot2 robot3

 Dir/File1
      robot1 robot2 robot3

 Dir/File2
      robot1 robot2 robot3

 Stage0:
             R1       R2       R3

   ********
   * File *  =>       =>       =>
   ********
   .=============================.  .===================.
  ( O     ::ConveyorBelt        O )( O  ::ConveyorBelt O )
   `-----------------------------´  `-------------------´

  |--------------------- ::Aline ------------------------|

 Stage1:

  As above, but Stage0 output-files are fed back as input.

Switches (Vertices)

Multiple conveyor-belts can be arranged as an DAG via the ::ConveyorBelt::Switch class. ____ / (CB)----Switch::OneProximalOneDistal----(CB)-Switch::OneProximalTwoDistal \____ =head1 SYNOPSIS

 use Workflow::Aline;

 my $manager = Workflow::Aline::Manager->new( home_dir => '.aline' );

   # create a new Workflow::Aline dir (".aline") in the current directory

 $manager->dir_workflow_aline_setup;

   # create a new Workflow from the 'project_skeleton' dir available in the Aline
   # dir (.aline). 

 $manager->dir_project_setup( 'newprj1' );
 $manager->dir_project_setup( 'newprj2' );

   # use newprj2 as a skeleton

 $manager->dir_project_setup( 'newprj3', 'newprj2' );

 for( qw( newprj1 newprj2 newprj3 ) )
 {
    my $aline = Workflow::Aline->new_with_setup( home_dir => '.aline', project => $_ );

       # run implicates already a basic conveyorbuilt setup

    $aline->run( 
                  Workflow::Aline::Robot::Skip->new( when => sub { my ($this, $event, $session, $src) = @_; $src->stringify =~ /~$/i } ),
                  
                  Workflow::Aline::Robot::Skip->new( when => sub { my ($this, $event, $session, $src) = @_; $src->stringify =~ /maslib|cvs/i } ),
                  
                  Workflow::Aline::Robot::Skip->new( when => sub { my ($this, $event, $session, $src) = @_; $src->stringify =~ /tmpl$/ && not $session->master->is_staging } ),
                  
                  Workflow::Aline::Robot::Mkdir->new(),
                  
                  Workflow::Aline::Robot::Copy->new(),
                  
                  Workflow::Aline::Robot::Template->new( detector => sub { $_[1] =~ /\.tmpl$/ } ),
                  
                  Workflow::Aline::Robot::Decorator->new( stage => 0 ),
                 );
    
    $aline->close;
  }

DESCRIPTION

Workflow::Aline iterates through a set of files and requests robots to act on these. Differentiated robots subject the files to certain actions, dependant on the robot type. A "copy-robot" would ie. copy the file from one to another location, for example.

The design is similar to an event-driven parsing of an DAG. The DAG in that instance is the file-tree and the events are the robots.

EXPORT

None by default.

SEE ALSO

Class::Listener, Class::Maker, HTML::Mason, CPAN.

INCLUDED IN THIS PACKAGE

Workflow::Aline::Robot, Workflow::Aline::Pluggable, Workflow::Aline::ConveyorBelt.

AUTHOR

Murat Uenalan, <muenalan@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2004 by M. Uenalan

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 529:

Non-ASCII character seen before =encoding in '`-----------------------------´'. Assuming CP1252