Changeset 6 in bookmarks


Ignore:
Timestamp:
03/23/12 22:43:34 (12 years ago)
Author:
peter
Message:

using CGI::Application::Plugin::TT instead of Template directly for template support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BookmarkApp.pm

    r5 r6  
    44use base qw{CGI::Application}; 
    55 
     6use CGI::Application::Plugin::TT; 
     7 
    68use DBI; 
    79use Encode; 
    810use JSON; 
    9 use Template; 
    1011use Bookmarks; 
    11  
    12 my $template = Template->new; 
    1312 
    1413my $dbname = 'new.db'; 
     
    5251                -status  => 404, 
    5352            ); 
    54             $template->process( 
     53            return $self->tt_process( 
    5554                'bookmark.tt', 
    5655                $bookmark, 
    57                 \my $output, 
    5856            ); 
    59             return $output; 
    6057        } 
    6158    } 
     
    8885        $base_url .= '/' if $base_url =~ m{/bookmarks$}; 
    8986 
    90         $template->process( 
     87        return $self->tt_process( 
    9188            'list.tt', 
    9289            { 
     
    9794                resources    => \@resources, 
    9895            }, 
    99             \my $output, 
    10096        ); 
    101         return $output; 
    10297    } 
    10398} 
     
    127122                -charset => 'UTF-8', 
    128123            ); 
    129             $template->process( 
     124            return $self->tt_process( 
    130125                'bookmark.tt', 
    131126                $bookmark, 
    132                 \my $output, 
    133127            ); 
    134             return $output; 
    135128        } 
    136129    } else { 
Note: See TracChangeset for help on using the changeset viewer.