--- trunk/lib/Frey/HTML.pm 2008/06/30 20:02:10 39
+++ trunk/lib/Frey/HTML.pm 2008/06/30 20:02:12 40
@@ -7,6 +7,10 @@
use Data::Dump qw/dump/;
use Carp qw/confess carp/;
+#use Template::Declare;
+use base qw/Template::Declare/;
+use Template::Declare::Tags; # defaults to 'HTML'
+
=head1 NAME
Frey::HTML - generate html pages
@@ -29,6 +33,8 @@
$path =~ s!::!/!g;
$path .= '.pm';
require $path or warn "Can't require $_ from $path: $!";
+ # this will import templates as fully qualified paths
+ import_templates $_ under "/$_/";
}
warn "available templates = ",dump( Template::Declare->templates );
@@ -36,9 +42,6 @@
our @javascript;
our $debug = 0;
-use Template::Declare;
-use Template::Declare::Tags; # defaults to 'HTML'
-
Template::Declare->init( roots => \@view_classes, around_template => sub {
my ($orig, $path, $args, $code) = @_;
my $from = (caller(1))[3];