The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Sequence - subroutine engine

VERSION

Version 0.0508

SYNOPSIS

    apseq sequence.as module.pm config.csv
    

or

    apseq argument.meta

FEATURES

1. Your subroutines can be execute in any combination.
2. Usage is very simple and flexible.
3. Config file is load automatically.

Using apseq script

When you install App::Sequence, apseq script is install at the same time. you can use apseq script on command line as the following way.

    apseq sequence.as module.pm config.csv

apseq script receive three type of files.

1. Sequence file( .as ), which contain subroutine names you want to execute.
2. Module file( .pm ), which contain subroutine definitions called by Sequence file.
3. Config file( .csv, .yml, .xml, .ini ), which contain data or setting.

apseq script receive three type of file, and execute subroutines.

File must be written by utf8.

Three type of file

Sequence file

    Sequence file must be end with .as

    Sequence file format is

        get_html( c.id, c.passwd ) : r.html
        edit( r.html, c.encoding ) : stdout

    I assume that you want to get html file on the web and edit the html file by using an encoding and print STDOUT.

    you pass argumet to subroutine and save return value. and saved return value is used in next subroutine.

Module file

    Module file must be end with .pm

    Module file is perl script that subroutine is defined.

        sub get_html{
            my ( $id, $passwd ) = @_;
            my $html;
            # ...
            return $html;
        }
        
        sub edit{
            my ( $html, $encoding ) = @_;
            my $output;
            # ...
            return $output;
        }
        1; # must be true value.

    Do not forget that last line must be true value.

Config file

Config file must be end with .csv, .yml, .xml, or .ini

1. CSV file( .csv )

CSV file first line is header.

CSV file format is

    name,age
    kimoto,29
    ken,13

This is converted to

    [
        { name => 'kimoto', age => '29' },
        { name => 'ken', age => '13' }
    ]

This is used in Sequence file. c.name, c.age, etc.

CSV file is useful to run same sequence repeatedly.This sample repeat sequence two times.

2. YAML file( .yml )

YAML file is loaded by YAML::LoadFile.

YAML format is

    name: kimoto
    age: 29
    # last line is needed!
    

Do not forget that space is needed after colon( : ) and last line is need;

This is converted to

    { name => 'kimoto', age => '29' }

This is used in Sequence file. c.name, c.age, etc.

See also YAML

3. XML file( .xml )

XML file is loaded by XML::Simple::XML

    <?xml version="1.0" encoding="UTF-8" ?>
    <config>
      <name>kimoto</name>
      <age>29</age>
    </config>

/This is converted to

    { name => 'kimoto', age => '29' }

This is used in Sequence file. c.name, c.age, etc.

4. Windows ini file( .ini )

Windows ini file is loaded by Config::Tiny

Windows ini format is

    [person]
    name=kimoto
    age=29

This is used in Sequence file. c.person.name, c.person.age, etc.

See also Config::Tiny

Meta file( .meta )

You can write argument of apseq in Meta file.

Meta file must be end with .meta

Meta file format is

    sequence.as
    module.pm
    config.csv

You can apseq script by passing Meta file.

    apseq argumets.meta

FUNCTIONS

App::Sequence is used through apseq script. so I do not explain each method.

argv

no explaination

conf_files

no explaination

confs

no explaination

create_from_argv

no explaination

module_files

no explaination

new

no explaination

r

no explaination

run

no explaination

sequence_files

no explaination

sequences

no explaination

directory

target directory

meta_file

meta file

AUTHOR

Yuki Kimoto <kimoto.yuki at gmail.com>

BUGS

Please report any bugs or feature requests to bug-app-sequence at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-Sequence. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc App::Sequence

You can also look for information at:

SEE ALSO

Plugger, YAML, XML::Simple, Config::Tiny

COPYRIGHT & LICENSE

Copyright 2008 Yuki, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.