line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::LinkEmbedder::Link::Image; |
2
|
1
|
|
|
1
|
|
417
|
use Mojo::Base 'Mojolicious::Plugin::LinkEmbedder::Link'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
sub to_embed { |
5
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
6
|
0
|
|
|
|
|
|
my %args = @_; |
7
|
|
|
|
|
|
|
|
8
|
0
|
|
0
|
|
|
|
$self->tag(img => src => $self->url, alt => $args{alt} || $self->url); |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
1; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=encoding utf8 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Mojolicious::Plugin::LinkEmbedder::Link::Image - Base class for image links |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
This class inherit from L. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 METHODS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head2 to_embed |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Returns an img tag. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 AUTHOR |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Jan Henning Thorsen - C |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |