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