From: Andy Grundman Date: Fri, 11 May 2007 15:27:01 +0000 (+0000) Subject: Static::Simple 0.17 X-Git-Tag: v0.17^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Ftags%2Fv0.17;p=catagits%2FCatalyst-Plugin-Static-Simple.git Static::Simple 0.17 --- diff --git a/Changes b/Changes index 2a6424a..e6a237c 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,5 @@ Revision history for Perl extension Catalyst::Plugin::Static::Simple -0.17 +0.17 2007-05-11 11:00:00 - Added serve_static_file, to serve a given file as static. (groditi) 0.16 2007-04-30 15:00:00 diff --git a/README b/README index 91f60c3..65e7141 100644 --- a/README +++ b/README @@ -172,6 +172,20 @@ USING WITH APACHE application, and it will continue to function on a development server, or using Catalyst's built-in server. +PUBLIC METHODS + serve_static_file $file_path + Will serve the file located in $file_path statically. This is useful + when you need to autogenerate them if they don't exist, or they are + stored in a model. + + package MyApp::Controller::User; + + sub curr_user_thumb : PathPart("my_thumbnail.png") { + my ( $self, $c ) = @_; + my $file_path = $c->user->picture_thumbnail_path; + $c->serve_static_file($file_path); + } + INTERNAL EXTENDED METHODS Static::Simple extends the following steps in the Catalyst process. @@ -199,7 +213,11 @@ AUTHOR Andy Grundman, CONTRIBUTORS - Marcus Ramberg, Jesse Sheidlower, + Marcus Ramberg, + + Jesse Sheidlower, + + Guillermo Roditi, THANKS The authors of Catalyst::Plugin::Static: