Stepford::Role::Step - The basic role all step classes must implement
version 0.000001
All of your step classes must consume this role. It provides the basic interface that the Stepford::Scheduler class expects
This role provides one attribute:
This attribute is required for all roles. It must be a string.
This attribute should be an array of one or more strings, each of which is the name of another step. This attribute is optional.
This role provides the following methods:
Returns the step's name.
Returns a list (not an arrayref) of the dependencies passed to the constructor.
Returns true if the step has dependencies.
Given a timestamp as a Unix epoch, this method should return true or false to indicate whether the step is up to date versus the timestamp.
Note that this timestamp could be a floating point number, and you are encouraged to use Time::HiRes as appropriate to provide hi-res timestamps of your own.
All classes which consume the Stepford::Role::Step role must implement the following methods:
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.
In the future, this method may receive additional arguments, such as a logger object.
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.
Dave Rolsky <drolsky@maxmind.com>
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.
To install Stepford, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Stepford
CPAN shell
perl -MCPAN -e shell install Stepford
For more information on module installation, please visit the detailed CPAN module installation guide.