[Catalyst-commits] r7670 - in trunk/Catalyst-Action-RenderView: .
lib/Catalyst/Action
bricas at dev.catalyst.perl.org
bricas at dev.catalyst.perl.org
Fri May 2 15:29:06 BST 2008
Author: bricas
Date: 2008-05-02 15:29:06 +0100 (Fri, 02 May 2008)
New Revision: 7670
Removed:
trunk/Catalyst-Action-RenderView/README
Modified:
trunk/Catalyst-Action-RenderView/Changes
trunk/Catalyst-Action-RenderView/Makefile.PL
trunk/Catalyst-Action-RenderView/lib/Catalyst/Action/RenderView.pm
Log:
dist fixes, definedness check (RT #30564)
Modified: trunk/Catalyst-Action-RenderView/Changes
===================================================================
--- trunk/Catalyst-Action-RenderView/Changes 2008-05-02 14:09:53 UTC (rev 7669)
+++ trunk/Catalyst-Action-RenderView/Changes 2008-05-02 14:29:06 UTC (rev 7670)
@@ -1,5 +1,6 @@
-0.08
- - Add AsCGI to list of build requirements.
+0.08 2008-05-02
+ - Add AsCGI to list of test requirements.
+ - Check for defined()ness of $c->res->body so "0" is valid. (RT #30564)
0.07 2007-09-01 11:03:00
- Add DateTime to default list of scrubbed objects
Modified: trunk/Catalyst-Action-RenderView/Makefile.PL
===================================================================
--- trunk/Catalyst-Action-RenderView/Makefile.PL 2008-05-02 14:09:53 UTC (rev 7669)
+++ trunk/Catalyst-Action-RenderView/Makefile.PL 2008-05-02 14:29:06 UTC (rev 7670)
@@ -1,5 +1,9 @@
-use inc::Module::Install 0.65;
+use inc::Module::Install 0.72;
+if ( -e 'MANIFEST.SKIP' ) {
+ system( 'pod2text lib/Catalyst/Action/RenderView.pm > README' );
+}
+
name 'Catalyst-Action-RenderView';
all_from 'lib/Catalyst/Action/RenderView.pm';
@@ -7,7 +11,7 @@
requires 'Test::More';
requires 'Data::Visitor' => '0.08';
-build_requires 'HTTP::Request::AsCGI';
+test_requires 'HTTP::Request::AsCGI';
auto_install;
WriteAll;
Deleted: trunk/Catalyst-Action-RenderView/README
===================================================================
--- trunk/Catalyst-Action-RenderView/README 2008-05-02 14:09:53 UTC (rev 7669)
+++ trunk/Catalyst-Action-RenderView/README 2008-05-02 14:29:06 UTC (rev 7670)
@@ -1,54 +0,0 @@
-NAME
- Catalyst::Action::RenderView - Sensible default end action.
-
-SYNOPSIS
- sub end : ActionClass('RenderView') {}
-
-DESCRIPTION
- This action implements a sensible default end action, which will forward
- to the first available view, unless status is set to 3xx, or there is a
- response body. It also allows you to pass "dump_info=1" to the url in
- order to force a debug screen, while in debug mode.
-
- If you have more than one view, you can specify which one to use with
- the "default_view" config setting (see Catalyst's "$c-"view($name)>
- method).
-
-METHODS
- end
- The default "end" action. You can override this as required in your
- application class; normal inheritance applies.
-
-INTERNAL METHODS
- execute
- Dispatches control to superclasses, then forwards to the default View.
-
- See "METHODS/action" in Catalyst::Action.
-
-EXTENDING
- To add something to an "end" action that is called before rendering,
- simply place it in the "end" method:
-
- sub end : ActionClass('RenderView') {
- my ( $self, $c ) = @_;
- # do stuff here; the RenderView action is called afterwards
- }
-
- To add things to an "end" action that are called *after* rendering, you
- can set it up like this:
-
- sub render : ActionClass('RenderView') { }
-
- sub end : Private {
- my ( $self, $c ) = @_;
- $c->forward('render');
- # do stuff here
- }
-
-AUTHOR
- Marcus Ramberg <marcus at thefeed.no>
-
-LICENSE
- This library is free software. You can redistribute it and/or modify it
- under the same terms as Perl itself.
-
Modified: trunk/Catalyst-Action-RenderView/lib/Catalyst/Action/RenderView.pm
===================================================================
--- trunk/Catalyst-Action-RenderView/lib/Catalyst/Action/RenderView.pm 2008-05-02 14:09:53 UTC (rev 7669)
+++ trunk/Catalyst-Action-RenderView/lib/Catalyst/Action/RenderView.pm 2008-05-02 14:29:06 UTC (rev 7670)
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
use base 'Catalyst::Action';
@@ -46,7 +46,7 @@
$c->response->content_type( 'text/html; charset=utf-8' );
}
return 1 if $c->req->method eq 'HEAD';
- return 1 if $c->response->body && length( $c->response->body );
+ return 1 if defined $c->response->body && length( $c->response->body );
return 1 if scalar @{ $c->error } && !$c->stash->{template};
return 1 if $c->response->status =~ /^(?:204|3\d\d)$/;
my $view = $c->view()
@@ -72,7 +72,7 @@
order to force a debug screen, while in debug mode.
If you have more than one view, you can specify which one to use with
-the C<default_view> config setting (see L<Catalyst>'s C<$c->view($name)>
+the C<default_view> config setting (see L<Catalyst>'s C<$c-E<gt>view($name)>
method).
=head1 METHODS
More information about the Catalyst-commits
mailing list