| 1 | package MojoMojo::Formatter::File::Image; | ||||||||||
| 2 | |||||||||||
| 3 | 26 | ▶ | use base qw/MojoMojo::Formatter/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 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 | 6 | ▶ | sub can_format { | ||||||||
|
Subroutine
can_format: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 28 | 6 | my $self = shift; | |||||||||
| 29 | 6 | my $type = shift; | |||||||||
| 30 | |||||||||||
| 31 | 6 | ▶ | return 1 if ( $type =~ /png|jpg|gif|tiff/ ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 6 | return 0; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | |||||||||||
| 36 | =item to_xhtml | ||||||||||
| 37 | |||||||||||
| 38 | takes Text and renders it as XHTML. | ||||||||||
| 39 | |||||||||||
| 40 | =cut | ||||||||||
| 41 | |||||||||||
| 42 | 0 | ▶ | sub to_xhtml { | ||||||||
|
Subroutine
to_xhtml: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 43 | 0 | 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 | 26 | 1; | |||||||||