comparison Lib/IMPL/Web/QueryHandler/PageFormat.pm @ 107:0e72ad99eef7

Updated Web::TT
author wizard
date Thu, 13 May 2010 03:46:29 +0400
parents 964587c5183c
children 1722ca51537c
comparison
equal deleted inserted replaced
106:83e356614c1e 107:0e72ad99eef7
35 35
36 my @path = split /\//, ($ENV{PATH_INFO} || '') or die new IMPL::Exception("PATH_INFO is empty and no defaultTarget specified" ); 36 my @path = split /\//, ($ENV{PATH_INFO} || '') or die new IMPL::Exception("PATH_INFO is empty and no defaultTarget specified" );
37 37
38 $doc->LoadFile ( File::Spec->catfile($this->templatesBase,@path), $this->templatesCharset ); 38 $doc->LoadFile ( File::Spec->catfile($this->templatesBase,@path), $this->templatesCharset );
39 $doc->AddVar( result => $nextHandler->() ); 39 $doc->AddVar( result => $nextHandler->() );
40 $doc->AddVar( absoluteUrl => sub { "/$_[0]" } );
40 { 41 {
41 local $@; 42 local $@;
42 $doc->AddVar( user => eval { IMPL::Security::Context->current->principal; } ); 43 $doc->AddVar( user => eval { IMPL::Security::Context->current->principal; } );
43 $doc->AddVar( session => eval { IMPL::Security::Context->current; } ); 44 $doc->AddVar( session => eval { IMPL::Security::Context->current; } );
44 warn $@ if $@; 45 warn $@ if $@;