| 1 | package Convert::CharMap; | ||||||||||
| 2 | 1 | $Convert::CharMap::VERSION = '0.10'; | |||||||||
| 3 | |||||||||||
| 4 | 1 | ▶ | use 5.006; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 9 | 0 | my $class = shift; | |||||||||
| 10 | 0 | return $class->load(@_); | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | sub load { | ||||||||
|
Subroutine
load: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 14 | 0 | my ( $class, $subclass, $file ) = @_; | |||||||||
| 15 | 0 | ▶ | $class = ref($class) if ref($class); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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 | 0 | ▶ | sub save { | ||||||||
|
Subroutine
save: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 23 | 0 | my ( $self, $subclass, $file ) = @_; | |||||||||
| 24 | 0 | my $class = ref($self); | |||||||||
| 25 | 0 | require "Convert/CharMap/$subclass.pm"; | |||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | open my $fh, '>', $file or die "Can't open $file for writing: $!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 0 | print $fh "$class\::$subclass"->out($self); | |||||||||
| 29 | 0 | close $fh; | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 1 | 1; | |||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||