DeploymentHandler/Deprecated.pm

filter: Statementstmt 88.8% 16 / 18 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 2 totaltotal 67.7% 21 / 31 CC 3 SCAR 9.0
CC
3
Cov
78%
BUILD
3.6
initial_version
2.0
BEGIN
1.0
CRAP 2.5
« 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
BranchTrueFalseTotal
if ($self->schema->can('ordered_versions') and $self->schema->ordered_versions) { } 0 3 3
Condition33%1/3
$self->schema->can("ordered_versions") and $self->schema->ordered_versions
!ll&&!rl&&r
300
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
ABresult
0X0
100
111
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__
« DeploymentHandler/VersionStorage/Standard/Component.pm ↑ Summary DeploymentHandler/VersionHandler/ExplicitVersions.pm »