line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DataFlow::Proc::Converter; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2288
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: A generic processor for format-conversion |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.121830'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
4085
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
extends 'DataFlow::Proc'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use DataFlow::Types qw(ConversionDirection ConversionSubs); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use namespace::autoclean; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has 'direction' => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
isa => 'ConversionDirection', |
20
|
|
|
|
|
|
|
required => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'converter_subs' => ( |
24
|
|
|
|
|
|
|
is => 'ro', |
25
|
|
|
|
|
|
|
isa => 'ConversionSubs', |
26
|
|
|
|
|
|
|
lazy => 1, |
27
|
|
|
|
|
|
|
required => 1, |
28
|
|
|
|
|
|
|
builder => '_build_subs', |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has 'converter_opts' => ( |
32
|
|
|
|
|
|
|
is => 'ro', |
33
|
|
|
|
|
|
|
isa => 'Any', |
34
|
|
|
|
|
|
|
predicate => 'has_converter_opts', |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has 'converter' => ( is => 'ro', ); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub _build_subs { |
40
|
|
|
|
|
|
|
return; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub _build_p { |
44
|
|
|
|
|
|
|
my $self = shift; |
45
|
|
|
|
|
|
|
return $self->converter_subs->{ $self->direction }; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |
52
|
|
|
|
|
|
|
=pod |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=encoding utf-8 |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 NAME |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
DataFlow::Proc::Converter - A generic processor for format-conversion |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 VERSION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
version 1.121830 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SEE ALSO |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Please see those modules/websites for more information related to this module. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=over 4 |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item * |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
L<DataFlow|DataFlow> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=back |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 AUTHOR |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Alexei Znamensky <russoz@cpan.org> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This software is copyright (c) 2011 by Alexei Znamensky. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
85
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
You can make new bug reports, and view existing ones, through the |
90
|
|
|
|
|
|
|
web interface at L<http://rt.cpan.org>. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTY |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
95
|
|
|
|
|
|
|
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT |
96
|
|
|
|
|
|
|
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER |
97
|
|
|
|
|
|
|
PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, |
98
|
|
|
|
|
|
|
EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE |
99
|
|
|
|
|
|
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
100
|
|
|
|
|
|
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE |
101
|
|
|
|
|
|
|
SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME |
102
|
|
|
|
|
|
|
THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
105
|
|
|
|
|
|
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
106
|
|
|
|
|
|
|
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE |
107
|
|
|
|
|
|
|
TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR |
108
|
|
|
|
|
|
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE |
109
|
|
|
|
|
|
|
SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING |
110
|
|
|
|
|
|
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A |
111
|
|
|
|
|
|
|
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF |
112
|
|
|
|
|
|
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
113
|
|
|
|
|
|
|
DAMAGES. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=cut |
116
|
|
|
|
|
|
|
|