r46560 - in /trunk/libcatalyst-view-tt-perl: Changes MANIFEST META.yml README debian/changelog lib/Catalyst/View/TT.pm t/lib/TestApp.pm t/lib/TestApp/Controller/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Oct 31 02:46:27 UTC 2009


Author: jawnsy-guest
Date: Sat Oct 31 02:46:21 2009
New Revision: 46560

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46560
Log:
Only affects build warnings right now; might cause FTBFS later if
the deprecated stuff is removed, but not likely anytime soon.
IGNORE-VERSION: 0.31-1
* New upstream release
  + Fixes deprecation warnings during build

Added:
    trunk/libcatalyst-view-tt-perl/t/lib/TestApp/Controller/
      - copied from r46559, branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/Controller/
Modified:
    trunk/libcatalyst-view-tt-perl/Changes
    trunk/libcatalyst-view-tt-perl/MANIFEST
    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/View/TT.pm
    trunk/libcatalyst-view-tt-perl/t/lib/TestApp.pm

Modified: trunk/libcatalyst-view-tt-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/Changes?rev=46560&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/Changes (original)
+++ trunk/libcatalyst-view-tt-perl/Changes Sat Oct 31 02:46:21 2009
@@ -1,4 +1,8 @@
 Revision history for Perl extension Catalyst::View::TT.
+
+0.31    2009-10-29 19:26:00
+        - Moved the test actions to their own controller file to silence
+          warning about actions in the app class being deprecated.
 
 0.30    2009-09-12 23:47:00
         - Doc fixes:

Modified: trunk/libcatalyst-view-tt-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/MANIFEST?rev=46560&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/MANIFEST (original)
+++ trunk/libcatalyst-view-tt-perl/MANIFEST Sat Oct 31 02:46:21 2009
@@ -29,6 +29,7 @@
 t/10providers.encoding.t
 t/11norequest.t
 t/lib/TestApp.pm
+t/lib/TestApp/Controller/Root.pm
 t/lib/TestApp/FauxProvider.pm
 t/lib/TestApp/root/specified_template.tt
 t/lib/TestApp/root/test.tt

Modified: trunk/libcatalyst-view-tt-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/META.yml?rev=46560&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/META.yml (original)
+++ trunk/libcatalyst-view-tt-perl/META.yml Sat Oct 31 02:46:21 2009
@@ -29,4 +29,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-View-TT/
-version: 0.30
+version: 0.31

Modified: trunk/libcatalyst-view-tt-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/README?rev=46560&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/README (original)
+++ trunk/libcatalyst-view-tt-perl/README Sat Oct 31 02:46:21 2009
@@ -253,10 +253,17 @@
     The constructor for the TT view. Sets up the template provider, and
     reads the application config.
 
-  process
+  process($c)
     Renders the template specified in "$c->stash->{template}" or
     "$c->action" (the private name of the matched action). Calls render to
     perform actual rendering. Output is stored in "$c->response->body".
+
+    It is possible to forward to the process method of a TT view from inside
+    Catalyst like this:
+
+        $c->forward('View::TT');
+
+    N.B. This is usually done automatically by Catalyst::Action::RenderView.
 
   render($c, $template, \%args)
     Renders the given template and returns output, or a Template::Exception
@@ -273,6 +280,14 @@
     $template can be anything that Template::process understands how to
     process, including the name of a template file or a reference to a test
     string. See Template::process for a full list of supported formats.
+
+    To use the render method outside of your Catalyst app, just pass a undef
+    context. This can be useful for tests, for instance.
+
+    It is possible to forward to the render method of a TT view from inside
+    Catalyst to render page fragments like this:
+
+        my $fragment = $c->forward("View::TT", "render", $template_name, $c->stash->{fragment_data});
 
   template_vars
     Returns a list of keys/values to be used as the catalyst variables in

Modified: trunk/libcatalyst-view-tt-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/debian/changelog?rev=46560&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/debian/changelog (original)
+++ trunk/libcatalyst-view-tt-perl/debian/changelog Sat Oct 31 02:46:21 2009
@@ -1,3 +1,14 @@
+libcatalyst-view-tt-perl (0.31-1) UNRELEASED; urgency=low
+
+  Only affects build warnings right now; might cause FTBFS later if
+  the deprecated stuff is removed, but not likely anytime soon.
+  IGNORE-VERSION: 0.31-1
+
+  * New upstream release
+    + Fixes deprecation warnings during build
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Fri, 30 Oct 2009 19:17:17 -0400
+
 libcatalyst-view-tt-perl (0.30-1) unstable; urgency=low
 
   [ Jonathan Yu ]

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=46560&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/lib/Catalyst/View/TT.pm (original)
+++ trunk/libcatalyst-view-tt-perl/lib/Catalyst/View/TT.pm Sat Oct 31 02:46:21 2009
@@ -9,7 +9,7 @@
 use Template::Timer;
 use MRO::Compat;
 
-our $VERSION = '0.30';
+our $VERSION = '0.31';
 
 __PACKAGE__->mk_accessors('template');
 __PACKAGE__->mk_accessors('include_path');
@@ -478,11 +478,18 @@
 The constructor for the TT view. Sets up the template provider,
 and reads the application config.
 
-=head2 process
+=head2 process($c)
 
 Renders the template specified in C<< $c->stash->{template} >> or
 C<< $c->action >> (the private name of the matched action).  Calls L<render> to
 perform actual rendering. Output is stored in C<< $c->response->body >>.
+
+It is possible to forward to the process method of a TT view from inside
+Catalyst like this:
+
+    $c->forward('View::TT');
+
+N.B. This is usually done automatically by L<Catalyst::Action::RenderView>.
 
 =head2 render($c, $template, \%args)
 
@@ -501,8 +508,13 @@
 process, including the name of a template file or a reference to a test string.
 See L<Template::process|Template/process> for a full list of supported formats.
 
-To use the render method outside of your Catalyst app, just pass a undef context. 
+To use the render method outside of your Catalyst app, just pass a undef context.
 This can be useful for tests, for instance.
+
+It is possible to forward to the render method of a TT view from inside Catalyst
+to render page fragments like this:
+
+    my $fragment = $c->forward("View::TT", "render", $template_name, $c->stash->{fragment_data});
 
 =head2 template_vars
 

Modified: trunk/libcatalyst-view-tt-perl/t/lib/TestApp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-view-tt-perl/t/lib/TestApp.pm?rev=46560&op=diff
==============================================================================
--- trunk/libcatalyst-view-tt-perl/t/lib/TestApp.pm (original)
+++ trunk/libcatalyst-view-tt-perl/t/lib/TestApp.pm Sat Oct 31 02:46:21 2009
@@ -21,64 +21,3 @@
 
 __PACKAGE__->setup;
 
-sub default : Private {
-    my ($self, $c) = @_;
-
-    $c->response->redirect($c->uri_for('test'));
-}
-
-sub test : Local {
-    my ($self, $c) = @_;
-
-    $c->stash->{message} = ($c->request->param('message') || $c->config->{default_message});
-}
-
-sub test_includepath : Local {
-    my ($self, $c) = @_;
-    $c->stash->{message} = ($c->request->param('message') || $c->config->{default_message});
-    $c->stash->{template} = $c->request->param('template');
-    if ( $c->request->param('additionalpath') ){
-        my $additionalpath = Path::Class::dir($c->config->{root}, $c->request->param('additionalpath'));
-        $c->stash->{additional_template_paths} = ["$additionalpath"];
-    }
-    if ( $c->request->param('addpath') ){
-        my $additionalpath = Path::Class::dir($c->config->{root}, $c->request->param('addpath'));
-        my $view = 'TestApp::View::TT::' . ($c->request->param('view') || $c->config->{default_view});
-        no strict "refs";
-        push @{$view . '::include_path'}, "$additionalpath";
-        use strict;
-    }
-}
-
-sub test_render : Local {
-    my ($self, $c) = @_;
-
-    my $out = $c->stash->{message} = $c->view('TT::Appconfig')->render($c, $c->req->param('template'), {param => $c->req->param('param') || ''});
-    if (UNIVERSAL::isa($out, 'Template::Exception')) {
-        $c->response->body($out);
-        $c->response->status(403);
-    } else {
-        $c->stash->{template} = 'test.tt';
-    }
-
-}
-
-sub test_msg : Local {
-    my ($self, $c) = @_;
-    my $tmpl = $c->req->param('msg');
-    
-    $c->stash->{message} = $c->view('TT::AppConfig')->render($c, \$tmpl);
-    $c->stash->{template} = 'test.tt';
-}
-
-sub end : Private {
-    my ($self, $c) = @_;
-
-    return 1 if $c->response->status =~ /^3\d\d$/;
-    return 1 if $c->response->body;
-
-    my $view = 'View::TT::' . ($c->request->param('view') || $c->config->{default_view});
-    $c->forward($view);
-}
-
-1;




More information about the Pkg-perl-cvs-commits mailing list