[Catalyst-commits] r13343 - in Catalyst-Plugin-I18N/trunk/t/lib: .
TestApp TestApp/Controller
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Mon Jun 14 14:52:45 GMT 2010
Author: t0m
Date: 2010-06-14 15:52:45 +0100 (Mon, 14 Jun 2010)
New Revision: 13343
Added:
Catalyst-Plugin-I18N/trunk/t/lib/TestApp/Controller/
Catalyst-Plugin-I18N/trunk/t/lib/TestApp/Controller/Root.pm
Modified:
Catalyst-Plugin-I18N/trunk/t/lib/TestApp.pm
Log:
Stop deprecated warnings from the test app
Added: Catalyst-Plugin-I18N/trunk/t/lib/TestApp/Controller/Root.pm
===================================================================
--- Catalyst-Plugin-I18N/trunk/t/lib/TestApp/Controller/Root.pm (rev 0)
+++ Catalyst-Plugin-I18N/trunk/t/lib/TestApp/Controller/Root.pm 2010-06-14 14:52:45 UTC (rev 13343)
@@ -0,0 +1,31 @@
+package TestApp::Controller::Root;
+use warnings;
+use strict;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config( namespace => q{} );
+
+sub maketext : Global {
+ my( $self, $c, $key ) = @_;
+ $c->res->body( $c->localize( $key ) );
+}
+
+sub current_language : Global {
+ my( $self, $c ) = @_;
+ $c->res->body( $c->language );
+}
+
+sub current_language_tag : Global {
+ my( $self, $c ) = @_;
+ $c->res->body( $c->language_tag );
+}
+
+sub current_languages_list : Global {
+ my( $self, $c ) = @_;
+ my $h = $c->installed_languages;
+ my $output = join(", ", map { "$_=".$h->{$_} } (sort keys %$h) );
+ $c->res->body( $output );
+}
+
+1;
Modified: Catalyst-Plugin-I18N/trunk/t/lib/TestApp.pm
===================================================================
--- Catalyst-Plugin-I18N/trunk/t/lib/TestApp.pm 2010-06-14 14:25:45 UTC (rev 13342)
+++ Catalyst-Plugin-I18N/trunk/t/lib/TestApp.pm 2010-06-14 14:52:45 UTC (rev 13343)
@@ -2,33 +2,10 @@
use strict;
use Catalyst qw/I18N/;
+use base qw/Catalyst/;
-our $VERSION = '0.01';
+__PACKAGE__->config( name => 'TestApp', root => '/some/dir' );
-TestApp->config( name => 'TestApp', root => '/some/dir' );
+__PACKAGE__->setup;
-TestApp->setup;
-
-sub maketext : Global {
- my( $self, $c, $key ) = @_;
- $c->res->body( $c->localize( $key ) );
-}
-
-sub current_language : Global {
- my( $self, $c ) = @_;
- $c->res->body( $c->language );
-}
-
-sub current_language_tag : Global {
- my( $self, $c ) = @_;
- $c->res->body( $c->language_tag );
-}
-
-sub current_languages_list : Global {
- my( $self, $c ) = @_;
- my $h = $c->installed_languages;
- my $output = join(", ", map { "$_=".$h->{$_} } (sort keys %$h) );
- $c->res->body( $output );
-}
-
1;
More information about the Catalyst-commits
mailing list