line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Farly::Director;
|
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
14784
|
use 5.008008;
|
|
12
|
|
|
|
|
39
|
|
|
12
|
|
|
|
|
444
|
|
4
|
12
|
|
|
12
|
|
58
|
use strict;
|
|
12
|
|
|
|
|
23
|
|
|
12
|
|
|
|
|
471
|
|
5
|
12
|
|
|
12
|
|
57
|
use warnings;
|
|
12
|
|
|
|
|
19
|
|
|
12
|
|
|
|
|
313
|
|
6
|
12
|
|
|
12
|
|
59
|
use Carp;
|
|
12
|
|
|
|
|
21
|
|
|
12
|
|
|
|
|
907
|
|
7
|
12
|
|
|
12
|
|
806
|
use Log::Any qw($log);
|
|
12
|
|
|
|
|
1878
|
|
|
12
|
|
|
|
|
61
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.26';
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new {
|
12
|
6
|
|
|
6
|
0
|
26
|
my $class = shift;
|
13
|
|
|
|
|
|
|
|
14
|
6
|
|
|
|
|
24
|
my $self = {
|
15
|
|
|
|
|
|
|
FILE => undef,
|
16
|
|
|
|
|
|
|
BUILDER => undef,
|
17
|
|
|
|
|
|
|
};
|
18
|
6
|
|
|
|
|
19
|
bless( $self, $class );
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
|
|
75
|
$log->info("$self NEW ");
|
22
|
6
|
|
|
|
|
37
|
return $self;
|
23
|
|
|
|
|
|
|
}
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub set_file {
|
26
|
5
|
|
|
5
|
0
|
10
|
my ( $self, $file ) = @_;
|
27
|
|
|
|
|
|
|
|
28
|
5
|
50
|
|
|
|
64
|
$file->isa('IO::File')
|
29
|
|
|
|
|
|
|
or confess "an IO::File object is required";
|
30
|
|
|
|
|
|
|
|
31
|
5
|
|
|
|
|
15
|
$self->{FILE} = $file;
|
32
|
|
|
|
|
|
|
|
33
|
5
|
|
|
|
|
39
|
$log->info( "$self set FILE = " . $self->{FILE} );
|
34
|
|
|
|
|
|
|
}
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub file {
|
37
|
5
|
|
|
5
|
0
|
43
|
return $_[0]->{FILE};
|
38
|
|
|
|
|
|
|
}
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub set_builder {
|
41
|
5
|
|
|
5
|
0
|
11
|
my ( $self, $builder ) = @_;
|
42
|
|
|
|
|
|
|
|
43
|
5
|
50
|
|
|
|
59
|
$builder->isa('Farly::Builder')
|
44
|
|
|
|
|
|
|
or confess " A Farly::Builder object is required ";
|
45
|
|
|
|
|
|
|
|
46
|
5
|
|
|
|
|
16
|
$self->{BUILDER} = $builder;
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
5
|
|
|
|
|
34
|
$log->info( "$self set BUILDER = " . $self->{BUILDER} );
|
50
|
|
|
|
|
|
|
}
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub builder {
|
53
|
15
|
|
|
15
|
0
|
104
|
return $_[0]->{BUILDER};
|
54
|
|
|
|
|
|
|
}
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub run {
|
57
|
5
|
|
|
5
|
0
|
14
|
my ($self) = @_;
|
58
|
|
|
|
|
|
|
|
59
|
5
|
|
|
|
|
20
|
$self->builder()->set_file( $self->file() );
|
60
|
5
|
|
|
|
|
24
|
$self->builder()->run();
|
61
|
5
|
|
|
|
|
87573
|
return $self->builder()->result();
|
62
|
|
|
|
|
|
|
}
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1;
|
65
|
|
|
|
|
|
|
__END__
|