File Coverage

_build/lib/ePortal/Builder.pm
Criterion Covered Total %
statement 6 22 27.2
branch 1 6 16.6
condition 0 7 0.0
subroutine 2 6 33.3
pod 0 5 0.0
total 9 46 19.5


line stmt bran cond sub pod time code
1             package ePortal::Builder;
2 1     1   2644 use Module::Build;
  1         238465  
  1         376  
3             @ISA = qw(Module::Build);
4              
5              
6             sub ACTION_manifest {
7 0     0 0 0 my $self = shift;
8 0         0 $self->run_perl_script('release/make_manifest.pl', undef, '--target='.$self->notes('ePortal_target'));
9             }
10              
11             sub ACTION_install {
12 0     0 0 0 my $self = shift;
13 0         0 $self->SUPER::ACTION_install();
14 0   0     0 ExtUtils::Install::install(
15             { 'comp_root' => $self->notes('ePortal_home').'/comp_root',
16             'bin' => $self->notes('ePortal_home').'/bin',
17             'samples' => $self->notes('ePortal_home').'/samples',
18             }, 1, 0, $self->{args}{uninst}||0);
19             }
20              
21             sub ACTION_fakeinstall {
22 0     0 0 0 my $self = shift;
23 0         0 $self->SUPER::ACTION_fakeinstall();
24 0   0     0 ExtUtils::Install::install(
25             { 'comp_root' => $self->notes('ePortal_home').'/comp_root',
26             'bin' => $self->notes('ePortal_home').'/bin',
27             'samples' => $self->notes('ePortal_home').'/samples',
28             }, 1, 1, $self->{args}{uninst}||0);
29             }
30              
31             sub ACTION_distmeta {
32 0     0 0 0 my $self = shift;
33 0 0       0 if ($self->notes('ePortal_target') ne 'ePortal') {
34 0         0 $self->{properties}{requires}{'ePortal::Server'} = $self->dist_version();
35             }
36 0         0 $self->SUPER::ACTION_distmeta();
37             }
38              
39             sub ACTION_test {
40 1     1 0 120 my $self = shift;
41              
42 1 50       23 if (-d './t') {
43 0         0 my @test_parameters = (
44             ['ePortal_test_host', 'Mysql server host', 'localhost'],
45             ['ePortal_test_database', 'MySQL database name (must exists)', 'eportal_test'],
46             ['ePortal_test_username', 'MySQL username', 'root'],
47             ['ePortal_test_password', 'MySQL password', ''],
48             ['ePortal_test_webserver', 'WEB server to test ("none" to skip)', 'http://test/'],
49             );
50 0         0 foreach my $rec (@test_parameters) {
51 0         0 local $^W = 0;
52 0 0 0     0 $self->notes($rec->[0], $self->prompt($rec->[1], $self->notes($rec->[0]) || $rec->[2])) if ! defined $self->notes($rec->[0]);
53             }
54             }
55              
56 1         34 $self->SUPER::ACTION_test();
57             }
58            
59              
60             1;