polish THIS SUCKS in main pod
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / Deprecated.pm
CommitLineData
01342998 1package DBIx::Class::DeploymentHandler::Deprecated;
2
9deabd1f 3# ABSTRACT: (DEPRECATED) Use this if you are stuck in the past
4
01342998 5use Moose;
6use Moose::Util 'apply_all_roles';
7
8extends 'DBIx::Class::DeploymentHandler::Dad';
41219a5d 9# a single with would be better, but we can't do that
10# see: http://rt.cpan.org/Public/Bug/Display.html?id=46347
01342998 11with 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedSqltDeployMethod',
12 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedVersionStorage';
41219a5d 13with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults';
01342998 14
15sub BUILD {
16 my $self = shift;
17
fe3b6dff 18 if ($self->schema->can('ordered_versions') && $self->schema->ordered_versions) {
01342998 19 apply_all_roles(
20 $self,
fe3b6dff 21 'DBIx::Class::DeploymentHandler::WithExplicitVersions'
01342998 22 );
23 } else {
24 apply_all_roles(
25 $self,
fe3b6dff 26 'DBIx::Class::DeploymentHandler::WithDatabaseToSchemaVersions'
01342998 27 );
28 }
29}
30
31__PACKAGE__->meta->make_immutable;
32
331;
34
e52174e3 35# vim: ts=2 sw=2 expandtab
36
01342998 37__END__
38
e52174e3 39