line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MojoMojo::Formatter::File::Image; |
2
|
|
|
|
|
|
|
|
3
|
26
|
|
|
26
|
|
160
|
use base qw/MojoMojo::Formatter/; |
|
26
|
|
|
|
|
60
|
|
|
26
|
|
|
|
|
4055
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
MojoMojo::Formatter::File::Image - Image formatter |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 DESCRIPTION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Image is not formatted in xhtml. The controller Image is used instead. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 METHODS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=over 4 |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=item can_format |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Can format Pod File |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub can_format { |
28
|
6
|
|
|
6
|
1
|
17
|
my $self = shift; |
29
|
6
|
|
|
|
|
17
|
my $type = shift; |
30
|
|
|
|
|
|
|
|
31
|
6
|
50
|
|
|
|
34
|
return 1 if ( $type =~ /png|jpg|gif|tiff/ ); |
32
|
6
|
|
|
|
|
32
|
return 0; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=item to_xhtml |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
takes Text and renders it as XHTML. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub to_xhtml { |
43
|
0
|
|
|
0
|
1
|
|
my ( $self, $text ) = @_; |
44
|
0
|
|
|
|
|
|
my $result; |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
return "Image can not be formatted in XHTML"; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=back |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SEE ALSO |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
L<MojoMojo>,L<Module::Pluggable::Ordered> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHORS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Daniel Brosseau <dab@catapulse.org> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 LICENSE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This module is licensed under the same terms as Perl itself. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |