« DeploymentHandler/VersionStorage/Standard/Component.pm
↑ Summary
DeploymentHandler/VersionHandler/ExplicitVersions.pm »
| 1 | package DBIx::Class::DeploymentHandler::Deprecated; | ||||||||||||||||||||||||||||
| 2 | 1 | $DBIx::Class::DeploymentHandler::Deprecated::VERSION = '0.002235'; | |||||||||||||||||||||||||||
| 3 | # ABSTRACT: (DEPRECATED) Use this if you are stuck in the past | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use Moose::Util 'apply_all_roles'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 0 | ▶ | sub initial_version { return $_[0]->database_version } | ||||||||||||||||||||||||||
|
Subroutine
initial_version: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 1 | extends 'DBIx::Class::DeploymentHandler::Dad'; | |||||||||||||||||||||||||||
| 11 | # a single with would be better, but we can't do that | ||||||||||||||||||||||||||||
| 12 | # see: http://rt.cpan.org/Public/Bug/Display.html?id=46347 | ||||||||||||||||||||||||||||
| 13 | 1 | with 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => { | |||||||||||||||||||||||||||
| 14 | interface_role => 'DBIx::Class::DeploymentHandler::HandlesDeploy', | ||||||||||||||||||||||||||||
| 15 | class_name => 'DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated', | ||||||||||||||||||||||||||||
| 16 | delegate_name => 'deploy_method', | ||||||||||||||||||||||||||||
| 17 | attributes_to_assume => ['schema'], | ||||||||||||||||||||||||||||
| 18 | attributes_to_copy => [qw( script_directory databases sql_translator_args )], | ||||||||||||||||||||||||||||
| 19 | }, | ||||||||||||||||||||||||||||
| 20 | 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => { | ||||||||||||||||||||||||||||
| 21 | interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersionStorage', | ||||||||||||||||||||||||||||
| 22 | class_name => 'DBIx::Class::DeploymentHandler::VersionStorage::Deprecated', | ||||||||||||||||||||||||||||
| 23 | delegate_name => 'version_storage', | ||||||||||||||||||||||||||||
| 24 | attributes_to_assume => ['schema'], | ||||||||||||||||||||||||||||
| 25 | }; | ||||||||||||||||||||||||||||
| 26 | 1 | with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults'; | |||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 3 | ▶ | sub BUILD { | ||||||||||||||||||||||||||
|
Subroutine
BUILD: called CC=3 SCAR=12.7
Pod
undocumented
| |||||||||||||||||||||||||||||
| 29 | 3 | my $self = shift; | |||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 3 | ▶ | if ($self->schema->can('ordered_versions') && $self->schema->ordered_versions) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->schema->can("ordered_versions") and $self->schema->ordered_versions
MC/DC0%0/2
$self->schema->can("ordered_versions") and $self->schema->ordered_versions
$self->schema->can("ordered_versions")
$self->schema->ordered_versions
Truth table33%1/3
A and B
A= $self->schema->can("ordered_versions")B= $self->schema->ordered_versions
| |||||||||||||||||||||||||||||
| 32 | 0 | apply_all_roles( | |||||||||||||||||||||||||||
| 33 | $self, | ||||||||||||||||||||||||||||
| 34 | 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => { | ||||||||||||||||||||||||||||
| 35 | interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersioning', | ||||||||||||||||||||||||||||
| 36 | class_name => 'DBIx::Class::DeploymentHandler::VersionHandler::ExplicitVersions', | ||||||||||||||||||||||||||||
| 37 | delegate_name => 'version_handler', | ||||||||||||||||||||||||||||
| 38 | attributes_to_assume => [qw( database_version schema_version to_version )], | ||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | ); | ||||||||||||||||||||||||||||
| 41 | } else { | ||||||||||||||||||||||||||||
| 42 | 3 | apply_all_roles( | |||||||||||||||||||||||||||
| 43 | $self, | ||||||||||||||||||||||||||||
| 44 | 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => { | ||||||||||||||||||||||||||||
| 45 | interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersioning', | ||||||||||||||||||||||||||||
| 46 | class_name => 'DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions', | ||||||||||||||||||||||||||||
| 47 | delegate_name => 'version_handler', | ||||||||||||||||||||||||||||
| 48 | attributes_to_assume => [qw( database_version schema_version to_version )], | ||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||
| 50 | ); | ||||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||
| 52 | # the following is just a hack so that ->version_storage | ||||||||||||||||||||||||||||
| 53 | # won't be lazy | ||||||||||||||||||||||||||||
| 54 | 3 | $self->version_storage; | |||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | 1 | 1; | |||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | # vim: ts=2 sw=2 expandtab | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | __END__ | ||||||||||||||||||||||||||||