OSDN Git Service

jcode.pl-2.13 対応:defined(%hash) is deprecated
authorkgsoft <kgsoft@871d6764-1e22-0410-b313-a55050885396>
Thu, 7 Dec 2017 13:54:48 +0000 (13:54 +0000)
committerkgsoft <kgsoft@871d6764-1e22-0410-b313-a55050885396>
Thu, 7 Dec 2017 13:54:48 +0000 (13:54 +0000)
lib/jcode.pl

index fc13c4b..753daf0 100644 (file)
@@ -681,7 +681,7 @@ sub __z2h_jis {
 
 sub z2h_euc {
     local(*s, $n) = @_;
 
 sub z2h_euc {
     local(*s, $n) = @_;
-    &init_z2h_euc unless defined %z2h_euc;
+    &init_z2h_euc if !%z2h_euc;
     $s =~ s/($re_euc_c|$re_euc_kana)/
        $z2h_euc{$1} ? ($n++, $z2h_euc{$1}) : $1
     /geo;
     $s =~ s/($re_euc_c|$re_euc_kana)/
        $z2h_euc{$1} ? ($n++, $z2h_euc{$1}) : $1
     /geo;
@@ -690,7 +690,7 @@ sub z2h_euc {
 
 sub z2h_sjis {
     local(*s, $n) = @_;
 
 sub z2h_sjis {
     local(*s, $n) = @_;
-    &init_z2h_sjis unless defined %z2h_sjis;
+    &init_z2h_sjis if !%z2h_sjis;
     $s =~ s/($re_sjis_c)/$z2h_sjis{$1} ? ($n++, $z2h_sjis{$1}) : $1/geo;
     $n;
 }
     $s =~ s/($re_sjis_c)/$z2h_sjis{$1} ? ($n++, $z2h_sjis{$1}) : $1/geo;
     $n;
 }