line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Convert::CharMap; |
2
|
|
|
|
|
|
|
$Convert::CharMap::VERSION = '0.10'; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
687
|
use 5.006; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
248
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
10
|
0
|
|
|
|
|
|
return $class->load(@_); |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub load { |
14
|
0
|
|
|
0
|
0
|
|
my ( $class, $subclass, $file ) = @_; |
15
|
0
|
0
|
|
|
|
|
$class = ref($class) if ref($class); |
16
|
0
|
|
|
|
|
|
require "Convert/CharMap/$subclass.pm"; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $self = "$class\::$subclass"->in($file); |
19
|
0
|
|
|
|
|
|
return bless( $self, $class ); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub save { |
23
|
0
|
|
|
0
|
0
|
|
my ( $self, $subclass, $file ) = @_; |
24
|
0
|
|
|
|
|
|
my $class = ref($self); |
25
|
0
|
|
|
|
|
|
require "Convert/CharMap/$subclass.pm"; |
26
|
|
|
|
|
|
|
|
27
|
0
|
0
|
|
|
|
|
open my $fh, '>', $file or die "Can't open $file for writing: $!"; |
28
|
0
|
|
|
|
|
|
print $fh "$class\::$subclass"->out($self); |
29
|
0
|
|
|
|
|
|
close $fh; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |