line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Umlautify; |
2
|
|
|
|
|
|
|
$Acme::Umlautify::VERSION = '1.07'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
require Exporter; |
5
|
|
|
|
|
|
|
require DynaLoader; |
6
|
|
|
|
|
|
|
|
7
|
5
|
|
|
5
|
|
42359
|
use utf8; |
|
5
|
|
|
|
|
58
|
|
|
5
|
|
|
|
|
27
|
|
8
|
5
|
|
|
5
|
|
387
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
170
|
|
9
|
5
|
|
|
5
|
|
27
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
29835
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
push our @ISA, 'Exporter'; |
12
|
|
|
|
|
|
|
our @EXPORT = qw/umlautify umlautify_latin/; |
13
|
|
|
|
|
|
|
our @EXPORT_OK = qw/umlautify umlautify_latin/; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our %map = ( A => 196, E => 203, I => 207, O => 214, U => 220, a => 228, |
16
|
|
|
|
|
|
|
e => 235, i => 239, o => 246, u => 252, y => 255 ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
3
|
|
|
3
|
0
|
546
|
bless({},$_[0]); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub do { |
23
|
2
|
|
|
2
|
0
|
1190
|
my $self = shift @_; |
24
|
2
|
|
|
|
|
8
|
return $self->umlautify(@_); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub umlautify { |
28
|
4
|
100
|
|
4
|
0
|
58
|
shift @_ if ref $_[0] eq 'Acme::Umlautify'; |
29
|
4
|
100
|
|
|
|
11
|
my @out = map { join '', map { $_ =~ /[\s\t\n]/ ? $_ : "$_\x{0308}" } split '', $_; } @_; |
|
8
|
|
|
|
|
42
|
|
|
110
|
|
|
|
|
450
|
|
30
|
4
|
100
|
|
|
|
172
|
return wantarray ? @out : $out[0]; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub umlautify_latin { |
34
|
4
|
100
|
|
4
|
0
|
802
|
shift @_ if ref $_[0] eq 'Acme::Umlautify'; |
35
|
4
|
|
|
|
|
8
|
our %map; |
36
|
4
|
100
|
|
|
|
11
|
my @out = map { join '', map { $_=chr($map{$_}) if $map{$_}; $_ } split '', $_; } @_; |
|
8
|
|
|
|
|
26
|
|
|
42
|
|
|
|
|
110
|
|
|
42
|
|
|
|
|
90
|
|
37
|
4
|
100
|
|
|
|
30
|
return wantarray ? @out : $out[0]; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |