Help for this page

Select Code to Download


  1. or download this
      my $template;
      eval {
          $template = new HTML::Template(filename => 'foo.tmpl');
    ...
      eval {
          print $template->output();
      };
    
  2. or download this
      <TMPL_IF debug>
      <ul>
      <TMPL_LOOP debuglog>
    ...
      <TMPL_ELSE>
      ... the non-debug page ...
      </TMPL_IF>
    
  3. or download this
      my @debuglog = ();
    
      if ( ... ) {
    ...
      ...
      $template->parameter(debug => 0 != @debuglog);
      $template->parameter(debuglog => \@debuglog);
    
  4. or download this
      sub debuglog {
          push @debuglog, {item => $_} for ( @_ );
      }
    
  5. or download this
      debuglog("Some message") if ( ... );