Korean.pm

filter: Statementstmt 57.8% 11 / 19 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 48.3% 15 / 31 CC 3 SCAR 17.4
CC
3
Cov
46%
import
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.7
« Korean/SKATS.pm ↑ Summary Korean/SKR_1984.pm »
1 # Encodings of Korean
2  
3 # $Id: Korean.pm,v 1.9 2007/11/29 14:29:53 you Exp $
4  
5 package Encode::Korean;
6  
7 1 ▶use 5.008008;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 our $VERSION = do { q$Revision: 1.9 $ =~ /\d+\.(\d+)/; sprintf "%.2f", $1 / 100 };
13  
14 0 ▶sub import {
Subroutine import: not called CC=3 SCAR=24.8
15 0 ▶ if ( defined $_[1] and $_[1] eq ':modes') {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_[1] and $_[1] eq ":modes") 0 0 0
Condition0%0/3
defined $_[1] and $_[1] eq ":modes"
!ll&&!rl&&r
000
MC/DC0%0/2
defined $_[1] and $_[1] eq ":modes"
defined $_[1] $_[1] eq ":modes"
Truth table0%0/3
A and B
A= defined $_[1]B= $_[1] eq ":modes"
ABresult
0X0
100
111
16 0 require Exporter;
17 0 our @ISA = qw(Exporter);
18 0 our @EXPORT_OK = qw(enmode demode);
19 0 __PACKAGE__->export_to_level(1, $_[0], 'enmode', 'demode');
20 0 splice @_, 1, 1;
21 }
22  
23 0 require Encode;
24 0 Encode->export_to_level(1, @_);
25 }
26  
27 # = transliteration-based encodings =
28  
29 1 ▶use Encode::Korean::ISO_TS_11941; # ISO TS 11941
Subroutine BEGIN: called CC=1 SCAR=0.0
30 use Encode::Korean::SKR_2000; # South Korean Romanization 2000
31 use Encode::Korean::SKR_1984; # South Korean Romanization 1984
32 use Encode::Korean::SKR_1959; # South Korean Romanization 1959
33 use Encode::Korean::NKR_1992; # North Korean Romanization 1992
34 use Encode::Korean::MRR; # McCune-Reischauer
35 use Encode::Korean::Yale; # Yale romanization for Korean
36 use Encode::Korean::SKATS; # Standard Korean Alphabet Transliteration System
37 use Encode::Korean::HSR; # Hangeul Society Romanization 1984
38  
39  
40 # = modes =
41  
42 sub enmode($@) {
43 my $enc = shift;
44 my $obj = Encode::find_encoding($enc);
45  
46 unless (defined $obj) {
47 require Carp;
48 Carp::croak("Unknown encoding '$enc'");
49 }
50 $obj->enmode(@_);
51 }
52  
53 sub demode($@) {
54 my $enc = shift;
55 my $obj = Encode::find_encoding($enc);
56  
57 unless (defined $obj) {
58 require Carp;
59 Carp::croak("Unknown encoding '$enc'");
60 }
61 $obj->demode(@_);
62  
63 }
64  
65 1;
66 __END__
« Korean/SKATS.pm ↑ Summary Korean/SKR_1984.pm »