Stepford::Role::Step - The basic role all step classes must implement
All of your step classes must consume this role. It provides the basic interface that the Stepford::Runner class expects.
This role provides one attribute:
This attribute is required for all roles. It will be provided to your step classes by the Stepford::Runner object.
The Step object will wrap the logger with an object that prepends prepends [$log_moniker] to each log message. The moniker is determined by calling $class->_log_moniker on the class during object construction.
This role provides the following methods:
This method returns a list of Moose::Meta::Attribute objects that were given the StepProduction trait. This can be an empty list.
Returns true if the step has a production of the given name.
Returns all production values as a hash reference.
This method returns the value of the given production for the object it is called on.
This method returns a list of Moose::Meta::Attribute objects that were given the StepDependency trait. This can be an empty list.
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.
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.
You can return undef from this method to request an unconditional rebuild of this step, regardless of the last_run_time of previous steps. If a step has an undef last_run_time after being run, then all steps that depend on that step will also be re-run.
All classes which consume the Stepford::Role::Step role may implement the following methods:
This is expected to return a string identifying the class for the purposes of logging. The default moniker is the full class name, but you may prefer to override this in your step classes with something shorter or more descriptive.
Bugs may be submitted through https://github.com/maxmind/Stepford/issues.
Dave Rolsky <email@example.com>
This software is copyright (c) 2014 - 2023 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.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.