line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Nightly::Base; |
2
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
42838
|
use strict; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
362
|
|
4
|
10
|
|
|
10
|
|
58
|
use warnings; |
|
10
|
|
|
|
|
19
|
|
|
10
|
|
|
|
|
414
|
|
5
|
|
|
|
|
|
|
|
6
|
10
|
|
|
10
|
|
76
|
use Carp; |
|
10
|
|
|
|
|
39
|
|
|
10
|
|
|
|
|
788
|
|
7
|
|
|
|
|
|
|
|
8
|
10
|
|
|
10
|
|
500
|
use Test::Nightly::Email; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
349
|
|
9
|
|
|
|
|
|
|
|
10
|
10
|
|
|
10
|
|
88
|
use base 'Class::Accessor::Fast'; |
|
10
|
|
|
|
|
19
|
|
|
10
|
|
|
|
|
9405
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my @methods = qw( |
13
|
|
|
|
|
|
|
debug |
14
|
|
|
|
|
|
|
report_template |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(@methods); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Test::Nightly::Base - Internal base methods |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 DESCRIPTION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Provides internal base methods for the Test::Nightly::* modules. You don't have to worry about what is here. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# |
32
|
|
|
|
|
|
|
# _init() |
33
|
|
|
|
|
|
|
# |
34
|
|
|
|
|
|
|
# Initialises the methods that have been passed in. |
35
|
|
|
|
|
|
|
# |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _init { |
38
|
|
|
|
|
|
|
|
39
|
30
|
|
|
30
|
|
79
|
my ($self, $conf, $methods) = @_; |
40
|
|
|
|
|
|
|
|
41
|
30
|
|
|
|
|
1084
|
$self->{_is_win32} = ( $^O =~ /^(MS)?Win32$/ ); |
42
|
30
|
|
|
|
|
109
|
$self->{_is_macos} = ( $^O eq 'MacOS' ); |
43
|
|
|
|
|
|
|
|
44
|
30
|
|
|
|
|
274
|
my @all_methods = @{$methods}; |
|
30
|
|
|
|
|
270
|
|
45
|
30
|
|
|
|
|
208
|
push (@all_methods, @methods); |
46
|
|
|
|
|
|
|
|
47
|
30
|
100
|
|
|
|
156
|
my $is_obj = 1 if ref($conf) =~ /Test::Night/; |
48
|
30
|
|
|
|
|
82
|
foreach my $method (@all_methods) { |
49
|
|
|
|
|
|
|
|
50
|
406
|
100
|
|
|
|
2191
|
if (defined $conf->{$method}) { |
51
|
43
|
100
|
|
|
|
100
|
if($is_obj) { |
52
|
19
|
|
|
|
|
73
|
$self->$method($conf->$method()); |
53
|
|
|
|
|
|
|
} else { |
54
|
24
|
|
|
|
|
163
|
$self->$method($conf->{$method}); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# |
62
|
|
|
|
|
|
|
# _debug() |
63
|
|
|
|
|
|
|
# |
64
|
|
|
|
|
|
|
# Carps a debug message. |
65
|
|
|
|
|
|
|
# |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub _debug { |
68
|
|
|
|
|
|
|
|
69
|
26
|
|
|
26
|
|
799
|
my ($self, $msg) = @_; |
70
|
|
|
|
|
|
|
|
71
|
26
|
50
|
|
|
|
308
|
if (defined $self->debug()) { |
72
|
0
|
|
|
|
|
0
|
carp $msg; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# |
78
|
|
|
|
|
|
|
# _perl_command() |
79
|
|
|
|
|
|
|
# |
80
|
|
|
|
|
|
|
# Returns the command to run perl. |
81
|
|
|
|
|
|
|
# |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub _perl_command { |
84
|
|
|
|
|
|
|
|
85
|
17
|
|
|
17
|
|
49
|
my $self = shift; |
86
|
|
|
|
|
|
|
|
87
|
17
|
50
|
|
|
|
82
|
return $ENV{HARNESS_PERL} if defined $ENV{HARNESS_PERL}; |
88
|
17
|
50
|
|
|
|
66
|
return Win32::GetShortPathName($^X) if $self->{_is_win32}; |
89
|
17
|
|
|
|
|
70
|
return $^X; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 AUTHOR |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Kirstin Bettiol |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 COPYRIGHT |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
(c) 2005 Kirstin Bettiol |
100
|
|
|
|
|
|
|
This library is free software, you can use it under the same terms as perl itself. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 SEE ALSO |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
L, |
105
|
|
|
|
|
|
|
L, |
106
|
|
|
|
|
|
|
L, |
107
|
|
|
|
|
|
|
L, |
108
|
|
|
|
|
|
|
L. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=cut |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
1; |
113
|
|
|
|
|
|
|
|