r55597 - in /trunk/libcatalyst-view-tt-perl: Changes META.yml README debian/changelog debian/source/ debian/source/format 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:46:48 UTC 2010


Author: jawnsy-guest
Date: Wed Apr  7 14:46:42 2010
New Revision: 55597

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=55597
Log:
* New upstream release
* Use new 3.0 (quilt) source format

Added:
    trunk/libcatalyst-view-tt-perl/debian/source/
    trunk/libcatalyst-view-tt-perl/debian/source/format
Modified:
    trunk/libcatalyst-view-tt-perl/Changes
    trunk/libcatalyst-view-tt-perl/META.yml
    trunk/libcatalyst-view-tt-perl/README
    trunk/libcatalyst-view-tt-perl/debian/changelog
    trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TT.pm
    trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TTSite.pm
    trunk/libcatalyst-view-tt-perl/lib/Catalyst/View/TT.pm

Modified: trunk/libcatalyst-view-tt-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/Changes?rev=55597&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/Changes (original)
+++ trunk/libcatalyst-view-tt-perl/Changes Wed Apr  7 14:46:42 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: trunk/libcatalyst-view-tt-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/META.yml?rev=55597&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/META.yml (original)
+++ trunk/libcatalyst-view-tt-perl/META.yml Wed Apr  7 14:46:42 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: trunk/libcatalyst-view-tt-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/README?rev=55597&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/README (original)
+++ trunk/libcatalyst-view-tt-perl/README Wed Apr  7 14:46:42 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: trunk/libcatalyst-view-tt-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/debian/changelog?rev=55597&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/debian/changelog (original)
+++ trunk/libcatalyst-view-tt-perl/debian/changelog Wed Apr  7 14:46:42 2010
@@ -1,3 +1,10 @@
+libcatalyst-view-tt-perl (0.34-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * Use new 3.0 (quilt) source format
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Wed, 07 Apr 2010 11:21:08 -0400
+
 libcatalyst-view-tt-perl (0.33-1) unstable; urgency=low
 
   * New upstream release

Added: trunk/libcatalyst-view-tt-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/debian/source/format?rev=55597&op=file
==============================================================================
--- trunk/libcatalyst-view-tt-perl/debian/source/format (added)
+++ trunk/libcatalyst-view-tt-perl/debian/source/format Wed Apr  7 14:46:42 2010
@@ -1,0 +1,1 @@
+3.0 (quilt)

Modified: trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TT.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TT.pm?rev=55597&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TT.pm (original)
+++ trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TT.pm Wed Apr  7 14:46:42 2010
@@ -8,7 +8,7 @@
 
 =head1 SYNOPSIS
 
-    script/create.pl view TT TT
+    script/create.pl view HTML TT
 
 =head1 DESCRIPTION
 

Modified: trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TTSite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TTSite.pm?rev=55597&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TTSite.pm (original)
+++ trunk/libcatalyst-view-tt-perl/lib/Catalyst/Helper/View/TTSite.pm Wed Apr  7 14:46:42 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: trunk/libcatalyst-view-tt-perl/lib/Catalyst/View/TT.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/lib/Catalyst/View/TT.pm?rev=55597&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/lib/Catalyst/View/TT.pm (original)
+++ trunk/libcatalyst-view-tt-perl/lib/Catalyst/View/TT.pm Wed Apr  7 14:46:42 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