[Catalyst-commits] r12750 - in
trunk/Catalyst-Plugin-UploadProgress/t/lib: . TestApp
TestApp/Controller
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Thu Jan 28 00:07:06 GMT 2010
Author: t0m
Date: 2010-01-28 00:07:06 +0000 (Thu, 28 Jan 2010)
New Revision: 12750
Added:
trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp/
trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp/Controller/
trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp/Controller/Root.pm
Modified:
trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp.pm
Log:
Stop deprecation warnings in the testapp
Added: trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp/Controller/Root.pm
===================================================================
--- trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp/Controller/Root.pm (rev 0)
+++ trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp/Controller/Root.pm 2010-01-28 00:07:06 UTC (rev 12750)
@@ -0,0 +1,14 @@
+package TestApp::Controller::Root;
+
+use strict;
+use base qw/Catalyst::Controller/;
+
+__PACKAGE__->config( namespace => '' );
+
+sub upload : Local {
+ my ( $self, $c ) = @_;
+
+ $c->res->output( 'ok' );
+}
+
+1;
Modified: trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp.pm 2010-01-28 00:04:29 UTC (rev 12749)
+++ trunk/Catalyst-Plugin-UploadProgress/t/lib/TestApp.pm 2010-01-28 00:07:06 UTC (rev 12750)
@@ -1,7 +1,7 @@
package TestApp;
use strict;
-use Catalyst;
+use base qw/Catalyst/;
use Data::Dumper;
our $VERSION = '0.01';
@@ -15,18 +15,13 @@
# Fail gracefully if we don't have FastMmap
my @plugins = ();
-eval {
- require Catalyst::Plugin::Cache::FastMmap;
+eval {
+ require Catalyst::Plugin::Cache::FastMmap;
};
unless ($@) {
push @plugins, qw/UploadProgress Cache::FastMmap/;
}
-TestApp->setup( @plugins );
-
-sub upload : Local {
- my ( $self, $c ) = @_;
-
- $c->res->output( 'ok' );
-}
+Catalyst->import( @plugins );
+__PACKAGE__->setup;
-1;
\ No newline at end of file
+1;
More information about the Catalyst-commits
mailing list