-------------------------- オリジナルメッセージ -------------------------- 件名: Re: "Require" 差出人: "Perrin Harkins" <[EMAIL PROTECTED]> 日付: 2004年 3月 4日 (木) 7:17 am [EMAIL PROTECTED](B: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] -------------------------------------------------------------------------- On Thu, 2004-03-04 at 08:56, [EMAIL PROTECTED] wrote: > PerlRun: `Undefined subroutine > &Apache::ROOT::Scripts::_30311::up_2ecgi::mimeencode called at > /usr/local/www/data/Scripts//update.cgi line 476. > > How does this kind of problem likely happen? Is any bad script in the one > called by "require"? >This should explain it: >http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs >- Perrin Hi Thks.. Tried to parse %INC values to check if "required file" is in the list. It was there.. So calling required file works fine.. Problem is the scripts of the file required.. Is this causing ERROR?? ## &mimeencode interface ## sub main'mimeencode { local($_) = @_; s/$match_jis/$jis_in$1/go; s/$match_ascii/$jis_out$1/go; $kanji = &checkkanji; s/$match_sjis/&s2j($&)/geo if ($kanji eq 'SJIS'); s/$match_euc/&e2j($&)/geo if ($kanji eq 'EUC'); s/(\x1b[\$\([EMAIL PROTECTED])+/$1/g; 1 while s/([EMAIL PROTECTED])[EMAIL PROTECTED]/$1/; 1 while s/$match_jis/&mimeencode($&,$`,$')/eo; s/$match_ascii/$1/go; $_; } sub mimeencode { local($_, $befor, $after) = @_; local($back, $forw, $blen, $len, $flen, $str); $befor = substr($befor, rindex($befor, "\n")+1); $after = substr($after, 0, index($after, "\n")-$[); $back = " " unless ($befor eq "" || $befor =~ /[ \t\(]$/); $forw = " " unless ($after =~ /^\x1b\([BHJ]$/ || $after =~ /^\x1b\([BHJ][ \t\)]/); $blen = length($befor); $flen = length($forw)+length($&)-3 if ($after =~ /^$match_ascii/o); $len = length($_); return "" if ($len <= 3); if ($len > 39 || $blen + $mimelen{$len+3} > $limit){ if ($limit-$blen < 30){ $len = 0; }else{ $len = int(($limit-$blen-26)/4)*2+3; } if ($len >= 5){ $str = substr($_, 0, $len).$jis_out; $str = &base64encode($str); $str = $mime_head.$str.$mime_tail; $back.$str."\n ".$jis_in.substr($_, $len); }else{ "\n ".$_; } }else{ $_ .= $jis_out; $_ = &base64encode($_); $_ = $back.$mime_head.$_.$mime_tail; if ($blen + (length) + $flen > $limit){ $_."\n "; }else{ $_.$forw; } } } They are written in same cgi script.. -hara -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html