Schedule::LongSteps::Storage::AutoDBIx - An automatically deployed storage.
To use this, you will have to add the following dependencies to your dependency manager:
DBIx::Class, SQL::Translator, DBIx::Class::InflateColumn::Serializer, and one of DateTime::Format::* matching your database.
First instantiate a storage with a subroutine returning a valid $dbh (from DBI for instance, or from your own DBIx::Class::Schema)):
my $storage = Schedule::LongSteps::Storage::AutoDBIx->new({ get_dbh => sub{ return a valid $dbh }, });
Note that this will automatically create a table named 'schedule_longsteps_process' in your database. This is not configurable for now. That also means that building such a storage is slow, so try to do it only once in your application.
Then build and use a Schedule::LongSteps object:
my $long_steps = Schedule::LongSteps->new({ storage => $storage }); ...
A subroutine that returns a valid $dbh (from DBI) database connection handle. Required.
Set that to false if you dont want this to deploy its built in schema automatically. Defaults to 1.
See Schedule::LongSteps::Storage
Deploys this in the given dbh. Use this only ONCE if 'auto_deploy' is false.
Usage:
$this->deploy();
To install Schedule::LongSteps, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Schedule::LongSteps
CPAN shell
perl -MCPAN -e shell install Schedule::LongSteps
For more information on module installation, please visit the detailed CPAN module installation guide.