line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pipeline::Production; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
28771
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
102
|
|
4
|
3
|
|
|
3
|
|
16
|
use warnings::register; |
|
3
|
|
|
|
|
58
|
|
|
3
|
|
|
|
|
597
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
17
|
use Pipeline::Base; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
64
|
|
7
|
3
|
|
|
3
|
|
16
|
use base qw( Pipeline::Base ); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
946
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = "3.12"; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init { |
12
|
3
|
|
|
3
|
1
|
4
|
my $self = shift; |
13
|
3
|
50
|
|
|
|
20
|
if ($self->SUPER::init( @_ )) { |
14
|
3
|
|
|
|
|
12
|
$self->contents( '' ); |
15
|
3
|
|
|
|
|
14
|
return 1; |
16
|
|
|
|
|
|
|
} else { |
17
|
0
|
|
|
|
|
0
|
return 0; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub contents { |
22
|
14
|
|
|
14
|
1
|
29
|
my $self = shift; |
23
|
14
|
|
|
|
|
29
|
$self->contains( @_ ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub contains { |
27
|
14
|
|
|
14
|
1
|
17
|
my $self = shift; |
28
|
14
|
|
|
|
|
15
|
my $cont = shift; |
29
|
14
|
100
|
|
|
|
37
|
if (defined( $cont )) { |
30
|
6
|
|
|
|
|
22
|
$self->{ production_contains } = $cont; |
31
|
6
|
|
|
|
|
12
|
return $self; |
32
|
|
|
|
|
|
|
} else { |
33
|
8
|
|
|
|
|
52
|
return $self->{ production_contains }; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Pipeline::Production - wrapper for production objects |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 SYNOPSIS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
use Pipeline::Production; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
my $pp = Pipeline::Production->new(); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
$pp->contents( $object ); |
51
|
|
|
|
|
|
|
my $production = $pp->contents(); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 DESCRIPTION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
The C class acts as a wrapper around any scalar |
56
|
|
|
|
|
|
|
(and therfore object, or reference) that a Pipeline is to consider as |
57
|
|
|
|
|
|
|
a production. A production object will terminate the pipeline apon receipt |
58
|
|
|
|
|
|
|
and cause the cleanup segments to be executed. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 METHODS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=over 4 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item new() |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
The C method constructs a fresh Pipeline::Production object and |
67
|
|
|
|
|
|
|
returns it. In the process it calls the C method. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item init() |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
The C method is called at construction time to perform any pre-use |
72
|
|
|
|
|
|
|
initialization on the object. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item contents( [ SCALAR ] ) |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
The C method gets or sets the contents of the production, ie, the |
77
|
|
|
|
|
|
|
actual production itself. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item contains( [ SCALAR ] ) |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
A synonym for C |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=back |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SEE ALSO |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
C |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 AUTHOR |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
James A. Duncan |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 COPYRIGHT |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Copyright 2003 Fotango Ltd. All Rights Reserved. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
This software is released under the same terms as Perl itself. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |
100
|
|
|
|
|
|
|
|