File: Image.pm

package info (click to toggle)
libmojomojo-perl 1.11%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,496 kB
  • ctags: 927
  • sloc: perl: 14,671; sh: 148; xml: 120; makefile: 8; ruby: 6
file content (68 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package MojoMojo::Formatter::File::Image;

use base qw/MojoMojo::Formatter/;



=head1 NAME

MojoMojo::Formatter::File::Image - Image formatter

=head1 DESCRIPTION


Image is not formatted in xhtml. The controller Image is used instead.


=head1 METHODS

=over 4

=item can_format

Can format Pod File

=cut

sub can_format { 
  my $self = shift;
  my $type = shift;

  return 1 if ( $type =~ /png|jpg|gif|tiff/ );
  return 0;
}


=item to_xhtml

takes Text and renders it as XHTML.

=cut

sub to_xhtml {
    my ( $self, $text ) = @_;
    my $result;

    return "Image can not be formatted in XHTML";
}




=back

=head1 SEE ALSO

L<MojoMojo>,L<Module::Pluggable::Ordered>

=head1 AUTHORS

Daniel Brosseau <dab@catapulse.org>

=head1 LICENSE

This module is licensed under the same terms as Perl itself.

=cut

1;