| 1 | package DBIO::DeploymentHandler::HandlesDeploy; | ||||||||||||||||||||
| 2 | # ABSTRACT: Interface for deploy methods | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 3 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 3 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 3 | our $VERSION = '0.900007'; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 3 | ▶ | use DBIO::Exception; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 3 | ▶ | use namespace::clean; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 3 | my @REQUIRED = qw( | |||||||||||||||||||
| 15 | prepare_deploy | ||||||||||||||||||||
| 16 | deploy | ||||||||||||||||||||
| 17 | prepare_resultsource_install | ||||||||||||||||||||
| 18 | install_resultsource | ||||||||||||||||||||
| 19 | prepare_upgrade | ||||||||||||||||||||
| 20 | txn_do | ||||||||||||||||||||
| 21 | upgrade | ||||||||||||||||||||
| 22 | ); | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 10 | ▶ | sub assert_implemented { | ||||||||||||||||||
|
Subroutine
assert_implemented: called CC=4 SCAR=14.3
Pod
documented
| |||||||||||||||||||||
| 25 | 10 | my ($class, $target) = @_; | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 10 | ▶ | DBIO::Exception->throw( | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 28 | "$class->assert_implemented called without a target object" | ||||||||||||||||||||
| 29 | ) unless defined $target; | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 10 | my @missing = grep { !$target->can($_) } @REQUIRED; | |||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 10 | ▶ | return 1 unless @missing; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 2 | ▶ | DBIO::Exception->throw( | ||||||||||||||||||
|
Condition33%1/3
ref $target || $target
MC/DC0%0/2
ref $target || $target
ref $target
$target
Truth table33%1/3
A || B
A= ref $targetB= $target
| |||||||||||||||||||||
| 36 | (ref($target) || $target) | ||||||||||||||||||||
| 37 | . " does not implement the $class interface: missing method(s) " | ||||||||||||||||||||
| 38 | . join(', ', @missing) | ||||||||||||||||||||
| 39 | ); | ||||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 3 | 1; | |||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | # vim: ts=2 sw=2 expandtab | ||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | __END__ | ||||||||||||||||||||