r77572 - in /branches/upstream/libcatalyst-view-tt-perl/current: ./ inc/Module/ inc/Module/Install/ lib/Catalyst/View/ t/ t/lib/TestApp/Template/ t/lib/TestApp/View/TT/ t/lib/TestApp/root/any_include_path/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sun Jul 17 18:26:54 UTC 2011


Author: jawnsy-guest
Date: Sun Jul 17 18:26:52 2011
New Revision: 77572

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77572
Log:
[svn-upgrade] new version libcatalyst-view-tt-perl (0.37)

Added:
    branches/upstream/libcatalyst-view-tt-perl/current/t/13classconfig.t
    branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/Template/
    branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/Template/Any.pm
    branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/View/TT/Classconfig.pm
    branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/root/any_include_path/
    branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/root/any_include_path/test
Modified:
    branches/upstream/libcatalyst-view-tt-perl/current/Changes
    branches/upstream/libcatalyst-view-tt-perl/current/MANIFEST
    branches/upstream/libcatalyst-view-tt-perl/current/META.yml
    branches/upstream/libcatalyst-view-tt-perl/current/Makefile.PL
    branches/upstream/libcatalyst-view-tt-perl/current/README
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install.pm
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/AutoInstall.pm
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Base.pm
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Can.pm
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Fetch.pm
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Include.pm
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Makefile.pm
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Metadata.pm
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Win32.pm
    branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/WriteAll.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=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/Changes (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/Changes Sun Jul 17 18:26:52 2011
@@ -1,4 +1,7 @@
 Revision history for Perl extension Catalyst::View::TT.
+
+0.37   2011-07-17 09:20:00
+        - Allow setting of TT class rather than forcing 'Template'
 
 0.36   2010-10-19 15:00:00
         - Fixed subclassing when using expose_methods

Modified: branches/upstream/libcatalyst-view-tt-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/MANIFEST?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/MANIFEST (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/MANIFEST Sun Jul 17 18:26:52 2011
@@ -29,14 +29,18 @@
 t/10providers.encoding.t
 t/11norequest.t
 t/12expose_methods.t
+t/13classconfig.t
 t/lib/TestApp.pm
 t/lib/TestApp/Controller/Root.pm
 t/lib/TestApp/FauxProvider.pm
+t/lib/TestApp/root/any_include_path/test
 t/lib/TestApp/root/expose_methods.tt
 t/lib/TestApp/root/specified_template.tt
 t/lib/TestApp/root/test.tt
 t/lib/TestApp/root/test_include_path/testpath.tt
+t/lib/TestApp/Template/Any.pm
 t/lib/TestApp/View/TT/Appconfig.pm
+t/lib/TestApp/View/TT/Classconfig.pm
 t/lib/TestApp/View/TT/Encoding.pm
 t/lib/TestApp/View/TT/ExposeMethods.pm
 t/lib/TestApp/View/TT/ExposeMethodsSubclassed.pm

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=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/META.yml (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/META.yml Sun Jul 17 18:26:52 2011
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 1.00'
+generated_by: 'Module::Install version 1.01'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -28,5 +28,5 @@
   perl: 5.8.1
 resources:
   license: http://dev.perl.org/licenses/
-  repository: http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-View-TT/
-version: 0.36
+  repository: git://git.shadowcat.co.uk/catagits/Catalyst-View-TT.git
+version: 0.37

Modified: branches/upstream/libcatalyst-view-tt-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/Makefile.PL?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/Makefile.PL (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/Makefile.PL Sun Jul 17 18:26:52 2011
@@ -19,6 +19,6 @@
 test_requires 'Test::More';
 
 auto_install;
-resources repository => 'http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-View-TT/';
+resources repository => 'git://git.shadowcat.co.uk/catagits/Catalyst-View-TT.git';
 
 WriteAll;

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=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/README (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/README Sun Jul 17 18:26:52 2011
@@ -414,6 +414,25 @@
     hack in your own provider, or if you need to use
     Template::Provider::Encoding
 
+  "CLASS"
+    Allows you to specify a custom class to use as the template class
+    instead of Template.
+
+        package MyApp::View::Web;
+
+        use strict;
+        use base 'Catalyst::View::TT';
+
+        use Template::AutoFilter;
+
+        __PACKAGE__->config({
+            CLASS => 'Template::AutoFilter',
+        });
+
+    This is useful if you want to use your own subclasses of Template, so
+    you can, for example, prevent XSS by automatically filtering all output
+    through "| html".
+
   HELPERS
     The Catalyst::Helper::View::TT and Catalyst::Helper::View::TTSite helper
     modules are provided to create your view module. There are invoked by

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install.pm Sun Jul 17 18:26:52 2011
@@ -31,7 +31,7 @@
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -467,4 +467,4 @@
 
 1;
 
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2011 Adam Kennedy.

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/AutoInstall.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/AutoInstall.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/AutoInstall.pm Sun Jul 17 18:26:52 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Base.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Base.pm Sun Jul 17 18:26:52 2011
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 }
 
 # Suspend handler for "redefined" warnings

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Can.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Can.pm Sun Jul 17 18:26:52 2011
@@ -9,7 +9,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Fetch.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Fetch.pm Sun Jul 17 18:26:52 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Include.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Include.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Include.pm Sun Jul 17 18:26:52 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Makefile.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Makefile.pm Sun Jul 17 18:26:52 2011
@@ -8,7 +8,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Metadata.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Metadata.pm Sun Jul 17 18:26:52 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -515,6 +515,7 @@
 		'GNU Free Documentation license'     => 'unrestricted', 1,
 		'GNU Affero General Public License'  => 'open_source',  1,
 		'(?:Free)?BSD license'               => 'bsd',          1,
+		'Artistic license 2\.0'              => 'artistic_2',   1,
 		'Artistic license'                   => 'artistic',     1,
 		'Apache (?:Software )?license'       => 'apache',       1,
 		'GPL'                                => 'gpl',          1,
@@ -550,9 +551,9 @@
 
 sub _extract_bugtracker {
 	my @links   = $_[0] =~ m#L<(
-	 \Qhttp://rt.cpan.org/\E[^>]+|
-	 \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
-	 \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+	 https?\Q://rt.cpan.org/\E[^>]+|
+	 https?\Q://github.com/\E[\w_]+/[\w_]+/issues|
+	 https?\Q://code.google.com/p/\E[\w_\-]+/issues/list
 	 )>#gx;
 	my %links;
 	@links{@links}=();

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Win32.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/Win32.pm Sun Jul 17 18:26:52 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/WriteAll.pm?rev=77572&op=diff
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libcatalyst-view-tt-perl/current/inc/Module/Install/WriteAll.pm Sun Jul 17 18:26:52 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

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=77572&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 Sun Jul 17 18:26:52 2011
@@ -10,7 +10,7 @@
 use MRO::Compat;
 use Scalar::Util qw/blessed weaken/;
 
-our $VERSION = '0.36';
+our $VERSION = '0.37';
 $VERSION = eval $VERSION;
 
 __PACKAGE__->mk_accessors('template');
@@ -89,6 +89,7 @@
     my $config = {
         EVAL_PERL          => 0,
         TEMPLATE_EXTENSION => '',
+        CLASS              => 'Template',
         %{ $class->config },
         %{$arguments},
     };
@@ -188,8 +189,8 @@
     }
 
     $self->{template} =
-        Template->new($config) || do {
-            my $error = Template->error();
+        $config->{CLASS}->new($config) || do {
+            my $error = $config->{CLASS}->error();
             $c->log->error($error);
             $c->error($error);
             return undef;
@@ -687,6 +688,26 @@
 This can prove useful when you want to use the additional_template_paths hack
 in your own provider, or if you need to use Template::Provider::Encoding
 
+=head2 C<CLASS>
+
+Allows you to specify a custom class to use as the template class instead of
+L<Template>.
+
+    package MyApp::View::Web;
+
+    use strict;
+    use base 'Catalyst::View::TT';
+
+    use Template::AutoFilter;
+
+    __PACKAGE__->config({
+        CLASS => 'Template::AutoFilter',
+    });
+
+This is useful if you want to use your own subclasses of L<Template>, so you
+can, for example, prevent XSS by automatically filtering all output through
+C<| html>.
+
 =head2 HELPERS
 
 The L<Catalyst::Helper::View::TT> and

Added: branches/upstream/libcatalyst-view-tt-perl/current/t/13classconfig.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/t/13classconfig.t?rev=77572&op=file
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/t/13classconfig.t (added)
+++ branches/upstream/libcatalyst-view-tt-perl/current/t/13classconfig.t Sun Jul 17 18:26:52 2011
@@ -1,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More tests => 5;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use_ok('Catalyst::Test', 'TestApp');
+
+my $view = 'Classconfig';
+
+my $response;
+ok(($response = request("/test?view=$view"))->is_success, 'request ok');
+is($response->content, TestApp->config->{default_message}, 'message ok');
+
+my $message = scalar localtime;
+ok(($response = request("/test?view=$view&message=$message"))->is_success, 'request with message ok');
+is($response->content,  $message, 'message ok')

Added: branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/Template/Any.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/Template/Any.pm?rev=77572&op=file
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/Template/Any.pm (added)
+++ branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/Template/Any.pm Sun Jul 17 18:26:52 2011
@@ -1,0 +1,21 @@
+use strict;
+use warnings;
+
+package TestApp::Template::Any;
+
+use base 'Template';
+use FindBin;
+use Path::Class;
+
+sub new {
+    my $class = shift;
+
+    my $params = defined($_[0]) && ref($_[0]) eq 'HASH' ? shift : {@_};
+
+    my $includepath = dir($FindBin::Bin, '/lib/TestApp/root/any_include_path');
+    $params->{INCLUDE_PATH} = $includepath;
+
+    return $class->SUPER::new( $params );
+}
+
+1;

Added: branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/View/TT/Classconfig.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/View/TT/Classconfig.pm?rev=77572&op=file
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/View/TT/Classconfig.pm (added)
+++ branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/View/TT/Classconfig.pm Sun Jul 17 18:26:52 2011
@@ -1,0 +1,12 @@
+package TestApp::View::TT::Classconfig;
+
+use strict;
+use base 'Catalyst::View::TT';
+
+use TestApp::Template::Any;
+
+__PACKAGE__->config(
+    CLASS              => 'TestApp::Template::Any',
+);
+
+1;

Added: branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/root/any_include_path/test
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/root/any_include_path/test?rev=77572&op=file
==============================================================================
--- branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/root/any_include_path/test (added)
+++ branches/upstream/libcatalyst-view-tt-perl/current/t/lib/TestApp/root/any_include_path/test Sun Jul 17 18:26:52 2011
@@ -1,0 +1,1 @@
+[% message %]




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