Amon2-Plugin-L10N
view release on metacpan or search on metacpan
t/01_simple.t view on Meta::CPAN
);
package MyApp::Web;
use parent -norequire, qw/MyApp/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('Hello, %1', 'yappo') ) ]);
}
}
my $app = MyApp::Web->to_app;
subtest 'en' => sub {
test_psgi(
app => $app,
client => sub {
my $cb = shift;
t/02_before_hook.t view on Meta::CPAN
);
package MyApp::Web;
use parent -norequire, qw/MyApp/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('Hello, %1', 'yappo') ) ]);
}
}
my $app = MyApp::Web->to_app;
subtest 'ja' => sub {
test_psgi(
app => $app,
client => sub {
my $cb = shift;
t/03_after_hook.t view on Meta::CPAN
);
package MyApp::Web;
use parent -norequire, qw/MyApp/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('Hello, %1', 'yappo') ) ]);
}
}
my $app = MyApp::Web->to_app;
subtest 'th' => sub {
test_psgi(
app => $app,
client => sub {
my $cb = shift;
t/04_default_lang.t view on Meta::CPAN
);
package MyApp::Web;
use parent -norequire, qw/MyApp/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('Hello, %1', 'yappo') ) ]);
}
}
my $app = MyApp::Web->to_app;
subtest 'ja th' => sub {
test_psgi(
app => $app,
client => sub {
my $cb = shift;
t/04_default_lang.t view on Meta::CPAN
);
package MyApp2::Web;
use parent -norequire, qw/MyApp2/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('Hello, %1', 'yappo') ) ]);
}
}
my $app2 = MyApp2::Web->to_app;
subtest 'en' => sub {
test_psgi(
app => $app2,
client => sub {
my $cb = shift;
t/04_default_lang.t view on Meta::CPAN
);
package MyApp3::Web;
use parent -norequire, qw/MyApp3/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('Japan Hello, %1', 'yappo') ) ]);
}
}
my $app3 = MyApp3::Web->to_app;
subtest 'ja' => sub {
test_psgi(
app => $app3,
client => sub {
my $cb = shift;
t/05_l10n_class.t view on Meta::CPAN
);
package MyApp::Web;
use parent -norequire, qw/MyApp/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('Hello, %1', 'yappo') ) ]);
}
}
my $app = MyApp::Web->to_app;
subtest 'ja' => sub {
test_psgi(
app => $app,
client => sub {
my $cb = shift;
t/06_lexicon_options.t view on Meta::CPAN
);
package MyApp::Web;
use parent -norequire, qw/MyApp/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('good') ) ]);
}
}
my $app = MyApp::Web->to_app;
subtest 'good' => sub {
test_psgi(
app => $app,
client => sub {
my $cb = shift;
t/06_lexicon_options.t view on Meta::CPAN
);
package MyApp2::Web;
use parent -norequire, qw/MyApp2/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('bad exception') ) ]);
}
}
my $app2 = MyApp2::Web->to_app;
subtest 'bad' => sub {
test_psgi(
app => $app2,
client => sub {
my $cb = shift;
t/07_po_file_langs.t view on Meta::CPAN
);
package MyApp::Web;
use parent -norequire, qw/MyApp/;
use parent qw/Amon2::Web/;
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('Hello, %1', 'yappo') ) ]);
}
}
my $app = MyApp::Web->to_app;
subtest 'en-us' => sub {
test_psgi(
app => $app,
client => sub {
my $cb = shift;
( run in 0.521 second using v1.01-cache-2.11-cpan-49f99fa48dc )