Help for this page

Select Code to Download


  1. or download this
      The render method uses the results from engine and template to
      process a selected template through Template Toolkit.
    
  2. or download this
      render ($engine, $template)
    
  3. or download this
     sub render {
      my $self = shift;
    ...
        or die $tt->error;  # passes Template::Exception upward
      $self->display($output);
     }
    
  4. or download this
     sub template {
       '[% self.CGI.header %]This page intentionally left blank.';
     }
    
  5. or download this
      Called when a page gains control, either at the beginning for a 
      response, or in the middle when switched for rendering.  Defaults to
    + 
      nothing.
    
  6. or download this
     sub dispatch {
       my $self = shift;
       $self->param('rm') eq 'Webmail' and return 'Local::Page::Webmail' ;
       return 'Local::Page::Welcome';
     }
    
  7. or download this
     sub activate {
      my $self = shift;
    ...
      };
      $self->error($@) if $@;       # failed something, go to safe mode
     }
    
  8. or download this
       our $_mirror = __PACKAGE__->reflect; # for slots that aren't subs
    
  9. or download this
     $_mirror->addSlot 
      ([qw(CGI FIELD autoload)] => sub { # must be reset in mod_perl 
         require CGI; 
         CGI->new; 
       });
    
  10. or download this
     $_mirror->addSlot 
      ([qw(engine FIELD autoload)] => sub { 
    ...
         require Template; 
         Template->new or die "Creating tt: $Template::ERROR\n";
    + 
       });
    
  11. or download this
    
     app_enter app_leave control_enter control_leave 
     render_enter render_leave respond_enter respond_leave
    
  12. or download this
    #!/usr/bin/perl 
    
    ...
    warn $o->display('hi'); 
    
    CGI::Prototype->activate;