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