jQquery を使用して年齢認証を設置しようとエラーログを
確認していると以下のエラーを発見しました![]()
defined(%hash) is deprecated at ./jcode.pl line 684. \t(Maybe you should just omit the defined()?) defined(%hash) is deprecated at ./jcode.pl line 693. \t(Maybe you should just omit the defined()?)
jcode.pl の 684行目と693行目がエラーの原因らしいです![]()
こちらの情報を確認すると修正方法がありました![]()
jcode.plでdefined(%hash) is deprecated at ../perllib/jcode.pl line 684.のエラー
早速、以下の方法で修正する事にしました![]()
修正前
;#sub z2h_euc {
;# local(*s, $n) = @_;
;# &init_z2h_euc unless defined %z2h_euc;
;# $s =~ s/($re_euc_c|$re_euc_kana)/
;# $z2h_euc{$1} ? ($n++, $z2h_euc{$1}) : $1
;# /geo;
;# $n;
;#}
;#sub z2h_sjis {
;# local(*s, $n) = @_;
;# &init_z2h_sjis unless defined %z2h_sjis;
;# $s =~ s/($re_sjis_c)/$z2h_sjis{$1} ? ($n++, $z2h_sjis{$1}) : $1/geo;
;# $n;
;#}
修正後
sub z2h_euc {
local(*s, $n) = @_;
&init_z2h_euc if !%z2h_euc;
$s =~ s/($re_euc_c|$re_euc_kana)/$z2h_euc{$1} ? ($n++, $z2h_euc{$1}) : $1/geo;
$n;
}
sub z2h_sjis {
local(*s, $n) = @_;
&init_z2h_sjis if !%z2h_sjis;
$s =~ s/($re_sjis_c)/$z2h_sjis{$1} ? ($n++, $z2h_sjis{$1}) : $1/geo;
$n;
}
修正前の部分をコメントアウト後、修正後の内容を
記述する事で解決する事が出来ました![]()
