Name
CGI::Application::Plugin::Eparam
SYNOPSIS
package WebApp
use Jcode;# or use Encode or $CGI::Application::Plugin::Eparam::econv = sub { ... }
use CGI::Application::Plugin::Eparam;
sub cgiapp_init {
$CGI::Application::Plugin::Eparam::icode = 'sjis'; # input code
$CGI::Application::Plugin::Eparam::ocode = 'euc-jp'; # want code
}
Example
Application
package WebApp
use Jcode;# or use Encode or $CGI::Application::Plugin::Eparam::econv = sub { ... }
use CGI::Application::Plugin::Eparam;
sub cgiapp_init {
$CGI::Application::Plugin::Eparam::icode = 'sjis'; # input code
$CGI::Application::Plugin::Eparam::ocode = 'euc-jp'; # want code
}
SubClass
package WebApp::Pages::Public
sub setup {
$CGI::Application::Plugin::Eparam::icode = 'sjis';
$CGI::Application::Plugin::Eparam::ocode = 'euc-jp';
}
package WebApp::Pages::Admin
sub setup {
$CGI::Application::Plugin::Eparam::icode = 'euc-jp';
$CGI::Application::Plugin::Eparam::ocode = 'euc-jp';
}
Method
package WebApp::Pages::User::Mailform
sub mailform {
# this case is no convert
$CGI::Application::Plugin::Eparam::icode = 'jis';
$CGI::Application::Plugin::Eparam::ocode = 'jis';
# The thing used for the character-code conversion before Mail Sending can be done.
$CGI::Application::Plugin::Eparam::icode = 'sjis';
$CGI::Application::Plugin::Eparam::ocode = 'jis';
}
SEE ALSO
AUTHOR
Shinichiro Aska