line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FuseBead::From::PNG::View::JSON; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
600
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
13
|
$FuseBead::From::PNG::VERSION = '0.01'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
398
|
use parent qw(FuseBead::From::PNG::View); |
|
1
|
|
|
|
|
220
|
|
|
1
|
|
|
|
|
4
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
45
|
use Data::Debug; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
6
|
use JSON; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
4
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub print { |
17
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
18
|
0
|
0
|
|
|
|
|
my %args = ref $_[0] eq 'HASH' ? %{$_[0]} : @_; |
|
0
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
return JSON->new->utf8->pretty->encode( \%args ); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=pod |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
FuseBead::From::PNG::View::JSON - Format data returned from FuseBead::From::PNG |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
use FuseBead::From::PNG; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $object = FuseBead::From::PNG->new({ filename => 'my_png.png' }); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$object->process(view => 'JSON'); # Data is returned as JSON |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Class to returned processed data in JSON format |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 USAGE |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 new |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Usage : ->new() |
46
|
|
|
|
|
|
|
Purpose : Returns FuseBead::From::PNG::View::JSON object |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Returns : FuseBead::From::PNG::View::JSON object |
49
|
|
|
|
|
|
|
Argument : |
50
|
|
|
|
|
|
|
Throws : |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Comment : |
53
|
|
|
|
|
|
|
See Also : |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 print |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Usage : ->print({}) or ->print(key1 => val1, key2 => val2) |
58
|
|
|
|
|
|
|
Purpose : Returns JSON formated data (in utf8 and pretty format) |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Returns : Returns JSON formated data (in utf8 and pretty format) |
61
|
|
|
|
|
|
|
Argument : |
62
|
|
|
|
|
|
|
Throws : |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Comment : |
65
|
|
|
|
|
|
|
See Also : |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 BUGS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SUPPORT |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Travis Chase |
75
|
|
|
|
|
|
|
CPAN ID: GAUDEON |
76
|
|
|
|
|
|
|
gaudeon@cpan.org |
77
|
|
|
|
|
|
|
https://github.com/gaudeon/FuseBead-From-Png |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 COPYRIGHT |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This program is free software licensed under the... |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
The MIT License |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
The full text of the license can be found in the |
86
|
|
|
|
|
|
|
LICENSE file included with this module. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 SEE ALSO |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
perl(1). |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
1; |