summaryrefslogtreecommitdiff
path: root/httemplate/autohandler
blob: 2bd3adffd7ea55b60e341b433dd85ef5c5e851c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
% $m->call_next;
<%init>
  dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile');
</%init>
<%filter>

my $profile = '';
if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {

  if ( lc($r->content_type) eq 'text/html' ) {

    $profile = '<PRE>'. ("\n"x4096). encode_entities(dbh->sprintProfile()).
               #"\n\n". &sprintAutoProfile(). '</PRE>';
               "\n\n".                        '</PRE>';
  } 

  dbh->{'private_profile'} = {};
}

s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i;
</%filter>