cleanup modelines
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / WithExplicitVersions.pm
CommitLineData
fe3b6dff 1package DBIx::Class::DeploymentHandler::WithExplicitVersions;
2use Moose::Role;
3
4use DBIx::Class::DeploymentHandler::VersionHandler::ExplicitVersions;
5
6use Carp 'carp';
7
8has version_handler => (
9 is => 'ro',
10 lazy_build => 1,
11 does => 'DBIx::Class::DeploymentHandler::HandlesVersioning',
12 handles => 'DBIx::Class::DeploymentHandler::HandlesVersioning',
13);
14
15sub _build_version_handler {
16 my $self = shift;
17
18 my $args = {
19 database_version => $self->database_version,
20 schema_version => $self->schema_version,
21 };
22
23 $args->{to_version} = $self->to_version if $self->has_to_version;
24 DBIx::Class::DeploymentHandler::VersionHandler::ExplicitVersions->new($args);
25}
26
271;
28
e52174e3 29# vim: ts=2 sw=2 expandtab
30
fe3b6dff 31__END__
32