NAME

Railway::Way - A way, a queue of stations

VERSION

version 0.003

ATTRIBUTES

stations A queue of stations

Get a station

METHODS

add

$way->add(sub{})->add(sub {});

Add build a station

get

my $station = $way->get(0);

Description

An abstract instance that holds your execution code

Synopsis

my $bldr  = Railway::Builder->new;
my $way   = $bldr->build_way;
my $train = $bldr->build_train;

$way->add(sub { say "station1 " })->add(sub { say "station2" });
$train->way($way)->start;

AUTHOR

alexbyk.com

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by alexbyk.

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