NAME
Stepford::Role::Step - The basic role all step classes must implement
VERSION
version 0.001002
DESCRIPTION
All of your step classes must consume this role. It provides the basic interface that the Stepford::Planner class expects.
ATTRIBUTES
This role provides one attribute:
logger
This attribute is required for all roles. It will be provided to your step classes by the Stepford::Planner object.
METHODS
This role provides the following methods:
$step->productions()
This method returns a list of Moose::Meta::Attribute objects that were given the StepProduction
trait. This can be an empty list.
$step->has_production($name)
Returns true if the step has a production of the given name.
$step->production_value($name)
This method returns the value of the given production for the object it is called on.
$step->dependencies()
This method returns a list of Moose::Meta::Attribute objects that were given the StepDependency
trait. This can be an empty list.
REQUIRED METHODS
All classes which consume the Stepford::Role::Step role must implement the following methods:
$step->run()
This method receives no arguments. It is expected to do whatever it is that the step does.
It may also do other things such as record the last run time.
$step->last_run_time()
This method must return a timestamp marking the last time the step was run. You are encouraged to use Time::HiRes as appropriate to provide hi-res timestamps.
AUTHOR
Dave Rolsky <drolsky@maxmind.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by MaxMind, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.