line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Acronyms; |
2
|
|
|
|
|
|
|
$HTML::Acronyms::VERSION = '0.0.2'; |
3
|
1
|
|
|
1
|
|
227361
|
use strict; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
28
|
use 5.014; |
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
7
|
use Carp (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
16
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
535
|
use Moo; |
|
1
|
|
|
|
|
11314
|
|
|
1
|
|
|
|
|
5
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'dict' => ( |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
required => 1, |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub abbr |
17
|
|
|
|
|
|
|
{ |
18
|
2
|
|
|
2
|
1
|
7779
|
my ( $self, $args ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
|
|
4
|
my $key = $args->{key}; |
21
|
2
|
|
|
|
|
4
|
my $no_link = $args->{no_link}; |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
|
|
8
|
my $rec = $self->dict->{$key}; |
24
|
|
|
|
|
|
|
|
25
|
2
|
50
|
|
|
|
6
|
if ( !defined $rec ) |
26
|
|
|
|
|
|
|
{ |
27
|
0
|
|
|
|
|
0
|
Carp::confess("unknown key '$key'!"); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
|
|
8
|
my $tag = qq{$rec->{abbr}}; |
31
|
|
|
|
|
|
|
|
32
|
2
|
100
|
|
|
|
19
|
return +{ html => ( $no_link ? $tag : qq{$tag} ), |
33
|
|
|
|
|
|
|
}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |