line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
7
|
|
|
7
|
|
36132
|
use 5.008; |
|
7
|
|
|
|
|
28
|
|
|
7
|
|
|
|
|
276
|
|
2
|
7
|
|
|
7
|
|
37
|
use strict; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
305
|
|
3
|
7
|
|
|
7
|
|
29
|
use warnings; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
343
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Hook::Modular::Test; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
7
|
|
|
7
|
|
188
|
$Hook::Modular::Test::VERSION = '1.101050'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
# ABSTRACT: utility functions for testing Hook::Modular |
10
|
7
|
|
|
7
|
|
9617
|
use File::Temp 'tempfile'; |
|
7
|
|
|
|
|
286020
|
|
|
7
|
|
|
|
|
547
|
|
11
|
7
|
|
|
7
|
|
6063
|
use YAML qw/Load DumpFile/; |
|
7
|
|
|
|
|
64931
|
|
|
7
|
|
|
|
|
559
|
|
12
|
7
|
|
|
7
|
|
66
|
use Exporter qw(import); |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
1276
|
|
13
|
|
|
|
|
|
|
our %EXPORT_TAGS = (util => [qw(write_config_file)],); |
14
|
|
|
|
|
|
|
our @EXPORT_OK = @{ $EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ] }; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub write_config_file { |
17
|
7
|
|
|
7
|
1
|
399
|
my $yaml = shift; |
18
|
7
|
|
|
|
|
60
|
my $filename = (tempfile())[1]; |
19
|
7
|
|
|
|
|
6810
|
DumpFile($filename, Load($yaml)); |
20
|
7
|
|
|
|
|
392516
|
$filename; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |