r55593 - in /branches/upstream/libcatalyst-view-tt-perl/current: Changes META.yml README lib/Catalyst/Helper/View/TT.pm lib/Catalyst/Helper/View/TTSite.pm lib/Catalyst/View/TT.pm
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Wed Apr 7 14:35:51 UTC 2010
Author: jawnsy-guest
Date: Wed Apr 7 14:35:44 2010
New Revision: 55593
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=55593
Log:
[svn-upgrade] Integrating new upstream version, libcatalyst-view-tt-perl (0.34)
Modified:
branches/upstream/libcatalyst-view-tt-perl/current/Changes
branches/upstream/libcatalyst-view-tt-perl/current/META.yml
branches/upstream/libcatalyst-view-tt-perl/current/README
branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TT.pm
branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TTSite.pm
branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/View/TT.pm
Modified: branches/upstream/libcatalyst-view-tt-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/Changes?rev=55593&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/Changes (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/Changes Wed Apr 7 14:35:44 2010
@@ -1,4 +1,14 @@
Revision history for Perl extension Catalyst::View::TT.
+
+0.34 2010-04-07 04:14:50
+ - Fix the process method to have the previous behaviour of reporting
+ an error to Catalyst if a Template::Exception object is returned by
+ the render method (i.e. when render_die is unset or set to 0).
+ - Fix the warning issued about missing the render_die config option to
+ log using the standard Catalyst logging system (rather than Carping
+ directly), and to only issue the warning at debug level / when
+ in debug mode. The severity of this warning will be increased in
+ a later release.
0.33 2010-03-10 20:08:00
- The "render()" method now throws a warning on exception before
Modified: branches/upstream/libcatalyst-view-tt-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/META.yml?rev=55593&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/META.yml (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/META.yml Wed Apr 7 14:35:44 2010
@@ -29,4 +29,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-View-TT/
-version: 0.33
+version: 0.34
Modified: branches/upstream/libcatalyst-view-tt-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/README?rev=55593&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/README (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/README Wed Apr 7 14:35:44 2010
@@ -8,9 +8,10 @@
# configure in lib/MyApp.pm (Could be set from configfile instead)
- MyApp->config(
- name => 'MyApp',
- root => MyApp->path_to('root'),
+ __PACKAGE__->config(
+ name => 'MyApp',
+ root => MyApp->path_to('root'),
+ default_view => 'TT',
'View::TT' => {
# any TT configurations items go here
INCLUDE_PATH => [
Modified: branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TT.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TT.pm?rev=55593&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TT.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TT.pm Wed Apr 7 14:35:44 2010
@@ -8,7 +8,7 @@
=head1 SYNOPSIS
- script/create.pl view TT TT
+ script/create.pl view HTML TT
=head1 DESCRIPTION
Modified: branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TTSite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TTSite.pm?rev=55593&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TTSite.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/Helper/View/TTSite.pm Wed Apr 7 14:35:44 2010
@@ -49,7 +49,7 @@
# use the helper to create the view module and templates
- $ script/myapp_create.pl view TT TTSite
+ $ script/myapp_create.pl view HTML TTSite
# add something like the following to your main application module
@@ -64,9 +64,9 @@
$c->stash->{template} = 'welcome.tt2';
}
- sub end : Private {
+ sub end : Private { # Or use Catalyst::Action::RenderView
my ( $self, $c ) = @_;
- $c->forward( $c->view('TT') );
+ $c->forward( $c->view('HTML') );
}
=head1 DESCRIPTION
@@ -166,7 +166,8 @@
PRE_PROCESS => 'config/main',
WRAPPER => 'site/wrapper',
ERROR => 'error.tt2',
- TIMER => 0
+ TIMER => 0,
+ render_die => 1,
});
=head1 NAME
Modified: branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/View/TT.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/View/TT.pm?rev=55593&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/View/TT.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/lib/Catalyst/View/TT.pm Wed Apr 7 14:35:44 2010
@@ -8,8 +8,9 @@
use Template;
use Template::Timer;
use MRO::Compat;
-
-our $VERSION = '0.33';
+use Scalar::Util qw/blessed/;
+
+our $VERSION = '0.34';
__PACKAGE__->mk_accessors('template');
__PACKAGE__->mk_accessors('include_path');
@@ -28,9 +29,10 @@
# configure in lib/MyApp.pm (Could be set from configfile instead)
- MyApp->config(
- name => 'MyApp',
- root => MyApp->path_to('root'),
+ __PACKAGE__->config(
+ name => 'MyApp',
+ root => MyApp->path_to('root'),
+ default_view => 'TT',
'View::TT' => {
# any TT configurations items go here
INCLUDE_PATH => [
@@ -212,10 +214,10 @@
local $@;
my $output = eval { $self->render($c, $template) };
if (my $err = $@) {
- my $error = qq/Couldn't render template "$template"/;
- $c->log->error($error);
- $c->error($error);
- return 0;
+ return $self->_rendering_error($c, $err);
+ }
+ if (blessed($output) && $output->isa('Template::Exception')) {
+ $self->_rendering_error($c, $output);
}
unless ( $c->response->content_type ) {
@@ -225,6 +227,14 @@
$c->response->body($output);
return 1;
+}
+
+sub _rendering_error {
+ my ($self, $c, $err) = @_;
+ my $error = qq/Couldn't render template "$err"/;
+ $c->log->error($error);
+ $c->error($error);
+ return 0;
}
sub render {
@@ -247,8 +257,7 @@
die $self->template->error if $self->{render_die};
return $self->template->error;
}
- require Carp;
- Carp::carp('The Catalyst::View::TT render() method of will die on error in a future release. If you want it to continue to return the exception instead, pass render_die => 0 to the constructor');
+ $c->log->debug('The Catalyst::View::TT render() method of will die on error in a future release. Unless you are calling the render() method manually, you probably want the new behaviour, so set render_die => 1 in config for ' . blessed($self) . '. If you are calling the render() method manually and you wish it to continue to return the exception rather than throwing it, add render_die => 0 to your config.') if $c->debug;
return $self->template->error;
}
return $output;
More information about the Pkg-perl-cvs-commits
mailing list