[Catalyst-commits] r11623 - in trunk/Catalyst-Plugin-Static: .
lib/Catalyst/Plugin t/lib t/lib/TestApp t/lib/TestApp/Controller
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Sun Oct 18 18:07:37 GMT 2009
Author: t0m
Date: 2009-10-18 18:07:37 +0000 (Sun, 18 Oct 2009)
New Revision: 11623
Added:
trunk/Catalyst-Plugin-Static/t/lib/TestApp/
trunk/Catalyst-Plugin-Static/t/lib/TestApp/Controller/
trunk/Catalyst-Plugin-Static/t/lib/TestApp/Controller/Root.pm
Removed:
trunk/Catalyst-Plugin-Static/MANIFEST
trunk/Catalyst-Plugin-Static/META.yml
Modified:
trunk/Catalyst-Plugin-Static/
trunk/Catalyst-Plugin-Static/Makefile.PL
trunk/Catalyst-Plugin-Static/lib/Catalyst/Plugin/Static.pm
trunk/Catalyst-Plugin-Static/t/lib/TestApp.pm
Log:
Update, remove warnings, remove generated files etc
Property changes on: trunk/Catalyst-Plugin-Static
___________________________________________________________________
Name: svn:ignore
+ pm_to_blib
blib
Makefile.old
Makefile
MANIFEST
MANIFEST.bak
inc
Deleted: trunk/Catalyst-Plugin-Static/MANIFEST
===================================================================
--- trunk/Catalyst-Plugin-Static/MANIFEST 2009-10-18 18:05:32 UTC (rev 11622)
+++ trunk/Catalyst-Plugin-Static/MANIFEST 2009-10-18 18:07:37 UTC (rev 11623)
@@ -1,9 +0,0 @@
-Changes
-Makefile.PL
-MANIFEST This list of files
-META.yml
-README
-Static.pm
-t/01use.t
-t/02static.t
-t/lib/TestApp.pm
Deleted: trunk/Catalyst-Plugin-Static/META.yml
===================================================================
--- trunk/Catalyst-Plugin-Static/META.yml 2009-10-18 18:05:32 UTC (rev 11622)
+++ trunk/Catalyst-Plugin-Static/META.yml 2009-10-18 18:07:37 UTC (rev 11623)
@@ -1,13 +0,0 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Catalyst-Plugin-Static
-version: 0.10
-version_from: Static.pm
-installdirs: site
-requires:
- Catalyst: 2.99
- File::MimeInfo: 0.11
- File::Slurp: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
Modified: trunk/Catalyst-Plugin-Static/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-Static/Makefile.PL 2009-10-18 18:05:32 UTC (rev 11622)
+++ trunk/Catalyst-Plugin-Static/Makefile.PL 2009-10-18 18:07:37 UTC (rev 11623)
@@ -6,7 +6,8 @@
PREREQ_PM => {
Catalyst => '2.99',
'File::MimeInfo' => '0.11',
- 'File::Slurp' => 0
+ 'File::Slurp' => 0,
+ 'MRO::Compat' => 0,
},
VERSION_FROM => 'lib/Catalyst/Plugin/Static.pm'
);
Modified: trunk/Catalyst-Plugin-Static/lib/Catalyst/Plugin/Static.pm
===================================================================
--- trunk/Catalyst-Plugin-Static/lib/Catalyst/Plugin/Static.pm 2009-10-18 18:05:32 UTC (rev 11622)
+++ trunk/Catalyst-Plugin-Static/lib/Catalyst/Plugin/Static.pm 2009-10-18 18:07:37 UTC (rev 11623)
@@ -6,14 +6,14 @@
use File::stat;
use File::Slurp;
use File::Spec::Functions qw/catdir no_upwards splitdir/;
-use NEXT;
+use MRO::Compat;;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
=head1 NAME
-Catalyst::Plugin::Static - Serve static files with Catalyst
+Catalyst::Plugin::Static - DEPRECATED - Serve static files with Catalyst
=head1 SYNOPSIS
@@ -27,9 +27,8 @@
=head1 DESCRIPTION
-Serve static files from config->{root}. Note that for most purposes, you'll
-probably want to use L<Catalyst::Plugin::Static::Simple> rather than this
-one.
+Serve static files from config->{root}. You probably want to use
+use L<Catalyst::Plugin::Static::Simple> rather than this module.
=head2 METHODS
@@ -48,14 +47,14 @@
$c->res->headers->remove_content_headers;
$c->finalize_headers;
}
- return $c->NEXT::finalize(@_);
+ return $c->next::method(@_);
}
=item serve_static
-Call this method from your action to serve requested path
-as a static file from your root. takes an optional content_type
+Call this method from your action to serve requested path
+as a static file from your root. takes an optional content_type
parameter
=cut
@@ -74,7 +73,7 @@
Serve a specified static file.
-=cut
+=cut
sub serve_static_file {
my $c = shift;
Added: trunk/Catalyst-Plugin-Static/t/lib/TestApp/Controller/Root.pm
===================================================================
--- trunk/Catalyst-Plugin-Static/t/lib/TestApp/Controller/Root.pm (rev 0)
+++ trunk/Catalyst-Plugin-Static/t/lib/TestApp/Controller/Root.pm 2009-10-18 18:07:37 UTC (rev 11623)
@@ -0,0 +1,14 @@
+package TestApp::Controller::Root;
+use strict;
+use warnings;
+use base qw/Catalyst::Controller/;
+
+__PACKAGE__->config(namespace => '');
+
+sub default : Private {
+ my ( $self, $c ) = @_;
+ $c->serve_static;
+}
+
+1;
+
Modified: trunk/Catalyst-Plugin-Static/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-Plugin-Static/t/lib/TestApp.pm 2009-10-18 18:05:32 UTC (rev 11622)
+++ trunk/Catalyst-Plugin-Static/t/lib/TestApp.pm 2009-10-18 18:07:37 UTC (rev 11623)
@@ -9,11 +9,6 @@
root => rel2abs( catpath( ( splitpath($0) )[0,1], '' ) )
);
-sub default : Private {
- my ( $self, $c ) = @_;
- $c->serve_static;
-}
-
__PACKAGE__->setup();
1;
More information about the Catalyst-commits
mailing list