From b6291a3ace59e7eed462aa0cf488d77670e29b39 Mon Sep 17 00:00:00 2001 From: Ken'ichi Fukamachi Date: Fri, 7 Sep 2018 19:43:40 +0900 Subject: remove debug codes. --- fml/lib/Mail/Message/Encode.pm | 78 ------------------------------------------ 1 file changed, 78 deletions(-) (limited to 'fml/lib/Mail/Message/Encode.pm') diff --git a/fml/lib/Mail/Message/Encode.pm b/fml/lib/Mail/Message/Encode.pm index 43acaa59..c21363a8 100644 --- a/fml/lib/Mail/Message/Encode.pm +++ b/fml/lib/Mail/Message/Encode.pm @@ -648,84 +648,6 @@ sub decode_mime_utf8_to_euc return Jcode->new($str,"utf8")->euc; } -=head1 DEBUG - -=head2 dump_string($str) - -dump $str as the style by "od -a". - -=cut - - -# Descriptions: dump $str as the style by "od -a". -# Arguments: OBJ($self) STR($str) -# Side Effects: none -# Return Value: none -sub dump_string -{ - my ($self, $str) = @_; - - $| = 1; - use FileHandle; - my $th = new FileHandle "|od -a"; - if (defined $th) { - print $th $str; - $th->close(); - } -} - - -# -# debug -# -if ($0 eq __FILE__) { - $| = 1; - - my $obj = new Mail::Message::Encode; - my $str = "ほえ といえばカードキャプターさくら KERO KEROちゃん"; - my $str0; - - print "=> test string\n"; - print $str, "\n"; - - for my $fp (qw(base64 qp)) { - print "\n=> $fp\n"; - { - my $s0 = $obj->base64($str); - my $s1 = $obj->decode_mime_string($s0); - my $s2 = $obj->base64($s1); - print $s0, "\n"; - print $s1, "\n"; - print " encode/decode/encode == encode ? "; - print $s0 eq $s2 ? "ok\n" : "fail.\n"; - } - } - - print "\n=> str code is <"; - print $obj->detect_code($str), ">\n"; - - for my $code (qw(jis sjis euc)) { - print "\n=> convert_str_ref($code) \tresult is <"; - $obj->convert_str_ref(\$str, $code); - print $obj->detect_code($str), ">/"; - - { - use Jcode; - my ($c) = &Jcode::getcode( $str ); - print "<$c>\n"; - } - } - - $str0 = STR2EUC( $str ); - print "\n=> STR2EUC ? = <", $obj->detect_code($str0), ">\n"; - - $str0 = STR2SJIS( $str ); - print "\n=> STR2SJIS ? = <", $obj->detect_code($str0), ">\n"; - - $str0 = STR2JIS( $str ); - print "\n=> STR2JIS ? = <", $obj->detect_code($str0), ">\n"; -} - =head1 CODING STYLE -- cgit v1.2.1