line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lego::From::PNG::View; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1580
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
22
|
$Lego::From::PNG::View::VERSION = '0.04'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
6
|
use Data::Debug; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
209
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
14
|
0
|
|
|
|
|
|
my $png = shift; |
15
|
0
|
0
|
0
|
|
|
|
die 'Lego::From::PNG object was not supplied' unless $png && ref($png) eq 'Lego::From::PNG'; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $hash = { png => $png }; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
0
|
|
|
|
my $self = bless ($hash, ref ($class) || $class); |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
sub png { shift->{'png'} } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub print { |
27
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
return @_; # Don't do anything, just return what they send us |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Lego::From::PNG::View - Format data returned from Lego::From::PNG |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SYNOPSIS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
use Lego::From::PNG; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my $object = Lego::From::PNG->new({ filename => 'my_png.png' }); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
$object->process(view => 'JSON'); # Data is returned as JSON |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 DESCRIPTION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Base class for formatting data returned from processing a PNG |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 USAGE |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 new |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Usage : ->new($png) |
55
|
|
|
|
|
|
|
Purpose : Returns Lego::From::PNG::View object |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Returns : Lego::From::PNG::View object |
58
|
|
|
|
|
|
|
Argument : L object is required as input |
59
|
|
|
|
|
|
|
Throws : |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Comment : This is just a base class so this shouldn't be directly used to format data |
62
|
|
|
|
|
|
|
See Also : |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 png |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Usage : ->png() |
67
|
|
|
|
|
|
|
Purpose : Returns the L object passed into the constructor |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Returns : L object |
70
|
|
|
|
|
|
|
Argument : |
71
|
|
|
|
|
|
|
Throws : |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Comment : |
74
|
|
|
|
|
|
|
See Also : |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 print |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Usage : ->print() |
79
|
|
|
|
|
|
|
Purpose : Returns formated input data |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Returns : In the case of the base class the args passed are just returned back |
82
|
|
|
|
|
|
|
Argument : |
83
|
|
|
|
|
|
|
Throws : |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Comment : |
86
|
|
|
|
|
|
|
See Also : |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 BUGS |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 SUPPORT |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 AUTHOR |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Travis Chase |
96
|
|
|
|
|
|
|
CPAN ID: GAUDEON |
97
|
|
|
|
|
|
|
gaudeon@cpan.org |
98
|
|
|
|
|
|
|
https://github.com/gaudeon/Lego-From-Png |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 COPYRIGHT |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
This program is free software licensed under the... |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The MIT License |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
The full text of the license can be found in the |
107
|
|
|
|
|
|
|
LICENSE file included with this module. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 SEE ALSO |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
perl(1). |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=cut |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
1; |