OpenInteract2/Setup/ReadRepository.pm

filter: Statementstmt 82.1% 23 / 28 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 2 totaltotal 69.7% 30 / 43 CC 2 SCAR 7.5
CC
2
Cov
74%
execute
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.1
« OpenInteract2/Manage/Website/Upgrade.pm ↑ Summary OpenInteract2/Manage/Website/InstallPackageSql.pm »
1 package OpenInteract2::Setup::ReadRepository;
2  
3 # $Id: ReadRepository.pm,v 1.3 2005/03/18 04:09:51 lachoy Exp $
4  
5 87 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 87 ▶use base qw( OpenInteract2::Setup );
Subroutine BEGIN: called CC=1 SCAR=0.0
7 87 ▶use Log::Log4perl qw( get_logger );
Subroutine BEGIN: called CC=1 SCAR=0.0
8 87 ▶use OpenInteract2::Constants qw( :log );
Subroutine BEGIN: called CC=1 SCAR=0.0
9 87 ▶use OpenInteract2::Exception qw( oi_error );
Subroutine BEGIN: called CC=1 SCAR=0.0
10 87 ▶use OpenInteract2::Repository;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 87 $OpenInteract2::Setup::ReadRepository::VERSION = sprintf("%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/);
13  
14 87 my ( $log );
15  
16 87 ▶sub get_name {
Subroutine get_name: called CC=1 SCAR=0.0
Pod undocumented
17 87 return 'read repository';
18 }
19  
20 0 ▶sub execute {
Subroutine execute: not called CC=2 SCAR=17.9
Pod undocumented
21 0 my ( $self, $ctx ) = @_;
22 0 ▶ $log ||= get_logger( LOG_INIT );
Condition0%0/3
$log ||= get_logger("OI2.INITIALIZE")
l!l&&r!l&&!r
000
MC/DC0%0/2
$log ||= get_logger("OI2.INITIALIZE")
$log get_logger("OI2.INITIALIZE")
Truth table0%0/3
A ||= B
A= $logB= get_logger("OI2.INITIALIZE")
ABresult
1X1
011
000
23 0 my $bootstrap = $ctx->bootstrap;
24 0 $log->info( "Creating context from bootstrap with ",
25 "'", $bootstrap->website_dir, "'" );
26 0 $ctx->repository( OpenInteract2::Repository->new( $bootstrap ) );
27 }
28  
29 87 OpenInteract2::Setup->register_factory_type( get_name() => __PACKAGE__ );
30  
31 87 1;
32  
33 __END__
« OpenInteract2/Manage/Website/Upgrade.pm ↑ Summary OpenInteract2/Manage/Website/InstallPackageSql.pm »