[Catalyst-commits] r11705 - in Catalyst-View-TD/trunk: .
lib/Catalyst/Helper
theory at dev.catalyst.perl.org
theory at dev.catalyst.perl.org
Sun Nov 1 21:02:10 GMT 2009
Author: theory
Date: 2009-11-01 21:02:10 +0000 (Sun, 01 Nov 2009)
New Revision: 11705
Modified:
Catalyst-View-TD/trunk/Makefile.PL
Catalyst-View-TD/trunk/lib/Catalyst/Helper/TDClass.pm
Log:
* Require Template::Declare 0.42.
* Include template scaffolding in new template classes only if they are new
root classes.
Modified: Catalyst-View-TD/trunk/Makefile.PL
===================================================================
--- Catalyst-View-TD/trunk/Makefile.PL 2009-10-31 23:09:42 UTC (rev 11704)
+++ Catalyst-View-TD/trunk/Makefile.PL 2009-11-01 21:02:10 UTC (rev 11705)
@@ -10,7 +10,7 @@
all_from 'lib/Catalyst/View/TD.pm';
requires 'Catalyst' => '5.7';
-requires 'Template::Declare' => '0.41';
+requires 'Template::Declare' => '0.42';
requires 'File::Find' => 0;
requires 'Class::Accessor' => 0;
requires 'MRO::Compat' => 0;
Modified: Catalyst-View-TD/trunk/lib/Catalyst/Helper/TDClass.pm
===================================================================
--- Catalyst-View-TD/trunk/lib/Catalyst/Helper/TDClass.pm 2009-10-31 23:09:42 UTC (rev 11704)
+++ Catalyst-View-TD/trunk/lib/Catalyst/Helper/TDClass.pm 2009-11-01 21:02:10 UTC (rev 11705)
@@ -40,7 +40,11 @@
$helper->mk_dir($path);
$file = File::Spec->catfile( $path, "$file.pm" );
local $helper->{file} = $file;
- $helper->render_file( 'tmpl_class', $file, { class => $class, name => $name } );
+ $helper->render_file('tmpl_class', $file, {
+ class => $class,
+ name => $name,
+ scaffold => $name !~ /::/,
+ });
}
=head1 SEE ALSO
@@ -68,6 +72,7 @@
use strict;
use warnings;
use Template::Declare::Tags;
+[% IF scaffold -%]
# See Template::Declare docs for details on creating templates, which look
# something like this.
@@ -78,6 +83,7 @@
# body { h1 { "Hello, $vars->{user}" } };
# };
# };
+[% END -%]
=head1 NAME
More information about the Catalyst-commits
mailing list