/[Frey]/trunk/lib/Frey/HTML.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/HTML.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 23 by dpavlin, Sun Jun 29 16:24:41 2008 UTC revision 26 by dpavlin, Sun Jun 29 18:08:50 2008 UTC
# Line 5  use warnings; Line 5  use warnings;
5    
6  use Time::HiRes qw/time/;  use Time::HiRes qw/time/;
7  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
8  use Carp qw/confess/;  use Carp qw/confess carp/;
9    
10  =head1 NAME  =head1 NAME
11    
# Line 47  Template::Declare->init( roots => \@view Line 47  Template::Declare->init( roots => \@view
47                          title { $path }                          title { $path }
48                          link {                          link {
49                                  { rel is 'stylesheet' }                                  { rel is 'stylesheet' }
50                                  { href is 'static/app.css' }                                  { href is '/static/app.css' }
51                                  { type is 'text/css' }                                  { type is 'text/css' }
52                                  { media is 'screen' }                                  { media is 'screen' }
53                          };                          };
54                          foreach my $js ( @javascript ) {                          foreach my $js ( @javascript ) {
55                                  script {                                  script {
56                                          { type is 'text/javascript' }                                          { type is 'text/javascript' }
57                                          { src is $js }                                          { src is "/$js" }
58                                  }                                  }
59                          }                          }
60                  }                  }
# Line 76  Wrap template into html page Line 76  Wrap template into html page
76  sub page {  sub page {
77          my $self = shift;          my $self = shift;
78          warn "## page $_[0]\n";          warn "## page $_[0]\n";
79          return Template::Declare->show( @_ );          my $page = eval { Template::Declare->show( @_ ) };
80            if ( $@ ) {
81                    carp "ERROR: $@";
82                    $page = Template::Declare->show( 'error', $@ );
83            }
84            return $page;
85  }  }
86    
87  =head2 add_javascript  =head2 add_javascript

Legend:
Removed from v.23  
changed lines
  Added in v.26

  ViewVC Help
Powered by ViewVC 1.1.26