line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Toader::Render::supportedObjects; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
21013
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
160
|
|
4
|
5
|
|
|
5
|
|
25
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
115
|
|
5
|
5
|
|
|
5
|
|
27
|
use base 'Error::Helper'; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
1736
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Toader::Render::supportedObjects - This checks if a object is supported or not for rendering. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 0.1.0 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.1.0'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 METHODS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head2 new |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
This initiates the object. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $foo=Toader::Render::supportedObjects->new; |
28
|
|
|
|
|
|
|
if($foo->error){ |
29
|
|
|
|
|
|
|
warn('error: '.$foo->error.":".$foo->errorString); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub new{ |
35
|
0
|
|
|
0
|
1
|
|
my $self={ |
36
|
|
|
|
|
|
|
error=>undef, |
37
|
|
|
|
|
|
|
errorString=>'', |
38
|
|
|
|
|
|
|
perror=>undef, |
39
|
|
|
|
|
|
|
errorExtra=>{ |
40
|
|
|
|
|
|
|
flags=>{ |
41
|
|
|
|
|
|
|
1=>'noObj', |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
}; |
45
|
0
|
|
|
|
|
|
bless $self; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return $self; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 isSupported |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This checks if a object is supported or not. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
One argument is required and it is the object to check. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Error checking is only needed as long as what is passed |
57
|
|
|
|
|
|
|
is known to be defined. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $supported=$foo->isSupported( $obj ); |
60
|
|
|
|
|
|
|
if ( $foo->error ){ |
61
|
|
|
|
|
|
|
warn( 'Error:'.$foo->error.': '.$foo->errorString ); |
62
|
|
|
|
|
|
|
}else{ |
63
|
|
|
|
|
|
|
if ( $supported ){ |
64
|
|
|
|
|
|
|
print "The object is supported.\n"; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub isSupported{ |
71
|
0
|
|
|
0
|
1
|
|
my $self=$_[0]; |
72
|
0
|
|
|
|
|
|
my $obj=$_[1]; |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
$self->errorblank; |
75
|
|
|
|
|
|
|
|
76
|
0
|
0
|
|
|
|
|
if ( ! defined( $obj ) ){ |
77
|
0
|
|
|
|
|
|
$self->{error}=1; |
78
|
0
|
|
|
|
|
|
$self->{errorString}='No object passed'; |
79
|
0
|
|
|
|
|
|
$self->warn; |
80
|
0
|
|
|
|
|
|
return undef; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
my $toaderRenderable=0; |
84
|
0
|
|
|
|
|
|
eval( '$toaderRenderable=$obj->toaderRenderable;' ); |
85
|
|
|
|
|
|
|
|
86
|
0
|
|
|
|
|
|
return $toaderRenderable; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 ERROR CODES |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 1, noObj |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
No object has been passed. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 AUTHOR |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Zane C. Bowers-Hadley, C<< >> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 BUGS |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
102
|
|
|
|
|
|
|
the web interface at L. I will |
103
|
|
|
|
|
|
|
be notified, and then you'll automatically be notified of progress on your bug as I make |
104
|
|
|
|
|
|
|
changes. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 SUPPORT |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
perldoc Toader::Render::supportedObjects |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
You can also look for information at: |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=over 4 |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
L |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
L |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=item * CPAN Ratings |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
L |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item * Search CPAN |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
L |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=back |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Copyright 2013. Zane C. Bowers-Hadley. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
141
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
142
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=cut |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
1; # End of Toader::Render::supportedObjects |