7 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
8 |
use Carp qw/confess carp/; |
use Carp qw/confess carp/; |
9 |
|
|
10 |
|
#use Template::Declare; |
11 |
|
use base qw/Template::Declare/; |
12 |
|
use Template::Declare::Tags; # defaults to 'HTML' |
13 |
|
|
14 |
=head1 NAME |
=head1 NAME |
15 |
|
|
16 |
Frey::HTML - generate html pages |
Frey::HTML - generate html pages |
33 |
$path =~ s!::!/!g; |
$path =~ s!::!/!g; |
34 |
$path .= '.pm'; |
$path .= '.pm'; |
35 |
require $path or warn "Can't require $_ from $path: $!"; |
require $path or warn "Can't require $_ from $path: $!"; |
36 |
|
# this will import templates as fully qualified paths |
37 |
|
import_templates $_ under "/$_/"; |
38 |
} |
} |
39 |
|
|
40 |
warn "available templates = ",dump( Template::Declare->templates ); |
warn "available templates = ",dump( Template::Declare->templates ); |
42 |
our @javascript; |
our @javascript; |
43 |
our $debug = 0; |
our $debug = 0; |
44 |
|
|
|
use Template::Declare; |
|
|
use Template::Declare::Tags; # defaults to 'HTML' |
|
|
|
|
45 |
Template::Declare->init( roots => \@view_classes, around_template => sub { |
Template::Declare->init( roots => \@view_classes, around_template => sub { |
46 |
my ($orig, $path, $args, $code) = @_; |
my ($orig, $path, $args, $code) = @_; |
47 |
my $from = (caller(1))[3]; |
my $from = (caller(1))[3]; |