line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Data::Hopen::G::Link - base class for hopen edges |
2
|
|
|
|
|
|
|
package Data::Hopen::G::Link; |
3
|
9
|
|
|
9
|
|
3403
|
use strict; |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
281
|
|
4
|
9
|
|
|
9
|
|
50
|
use Data::Hopen::Base; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
57
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.000019'; |
7
|
|
|
|
|
|
|
|
8
|
9
|
|
|
9
|
|
2054
|
use parent 'Data::Hopen::G::Runnable'; |
|
9
|
|
|
|
|
23
|
|
|
9
|
|
|
|
|
51
|
|
9
|
|
|
|
|
|
|
use Class::Tiny { |
10
|
9
|
|
|
|
|
47
|
greedy => 0 |
11
|
9
|
|
|
9
|
|
507
|
}; |
|
9
|
|
|
|
|
21
|
|
12
|
|
|
|
|
|
|
|
13
|
9
|
|
|
9
|
|
1988
|
use Data::Hopen qw(:default UNSPECIFIED); |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
991
|
|
14
|
9
|
|
|
9
|
|
63
|
use Data::Hopen::Util::Data qw(clone); |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
1666
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Data::Hopen::G::Link - The base class for all hopen links between ops. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 VARIABLES |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 greedy |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
If set truthy in the C call, the edge will ask for all inputs. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 FUNCTIONS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 run |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Copy the inputs to the outputs. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $hrOutputs = $op->run($scope) |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
The output is C<{}> if no inputs are provided. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
By default, the output is a copy of the inputs |
37
|
|
|
|
|
|
|
(see L). |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub _run { |
42
|
2
|
|
|
2
|
|
12
|
my ($self, %args) = getparameters('self', [qw(; visitor)], @_); |
43
|
2
|
|
|
|
|
90
|
return $self->passthrough(-nocontext => 1); |
44
|
|
|
|
|
|
|
} #run() |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 BUILD |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Constructor. Interprets L. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub BUILD { |
54
|
12
|
|
|
12
|
1
|
6827
|
my ($self, $args) = @_; |
55
|
12
|
100
|
|
|
|
56
|
$self->want(UNSPECIFIED) if $args->{greedy}; |
56
|
|
|
|
|
|
|
#hlog { 'Link::BUILD', Dumper($self), Dumper($args) }; |
57
|
|
|
|
|
|
|
#hlog { 'Link::BUILD', Dumper($self->scope) }; |
58
|
|
|
|
|
|
|
} #BUILD() |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
__END__ |