line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Data::Hopen::G::OutputOp - operation with a fixed output |
2
|
|
|
|
|
|
|
package Data::Hopen::G::OutputOp; |
3
|
2
|
|
|
2
|
|
830
|
use Data::Hopen; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
125
|
|
4
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
42
|
|
5
|
2
|
|
|
2
|
|
13
|
use Data::Hopen::Base; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.000019'; |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
488
|
use parent 'Data::Hopen::G::Op'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
13
|
|
10
|
2
|
|
|
2
|
|
118
|
use Class::Tiny qw(output); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Docs {{{1 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Data::Hopen::G::OutputOp - operation with a fixed output |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
This is a L that simply outputs a fixed value you |
21
|
|
|
|
|
|
|
provide. Usage: |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $op = Data::Hopen::G::OutputOp(output => { foo => 42, bar => 1337 }); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 MEMBERS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 output |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
A hashref that will be the output. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# }}}1 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 FUNCTIONS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 _run |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Implementation of L. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub _run { |
44
|
13
|
100
|
|
13
|
|
1917
|
my $self = shift or croak 'Need an instance'; |
45
|
12
|
100
|
|
|
|
321
|
croak 'output is not a hashref' unless ref $self->output eq 'HASH'; |
46
|
11
|
|
|
|
|
261
|
return $self->output; |
47
|
|
|
|
|
|
|
} #_run() |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
__END__ |