Static::Simple 0.17 v0.17
Andy Grundman [Fri, 11 May 2007 15:27:01 +0000 (15:27 +0000)]
Changes
README

diff --git a/Changes b/Changes
index 2a6424a..e6a237c 100644 (file)
--- 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 (file)
--- 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, <andy@hybridized.org>
 
 CONTRIBUTORS
-    Marcus Ramberg, <mramberg@cpan.org> Jesse Sheidlower, <jester@panix.com>
+    Marcus Ramberg, <mramberg@cpan.org>
+
+    Jesse Sheidlower, <jester@panix.com>
+
+    Guillermo Roditi, <groditi@cpan.org>
 
 THANKS
     The authors of Catalyst::Plugin::Static: