summaryrefslogtreecommitdiff
path: root/httemplate/autohandler
diff options
context:
space:
mode:
authorivan <ivan>2003-08-07 12:47:27 +0000
committerivan <ivan>2003-08-07 12:47:27 +0000
commitabf5c5442afce5198f6289840791c96f58254e85 (patch)
tree424620194a7de53093feabaffdae198045225a83 /httemplate/autohandler
parent117a674a7e37ff2f4f90fcf34710dfad288ac8a9 (diff)
- switch to mason by default
- minimum mason version 1.1 (and doc) - evaluate .html files with mason/asp - turn on profiling with mason like with Apache::ASP (redirects not working) - (start of) includes
Diffstat (limited to 'httemplate/autohandler')
-rw-r--r--httemplate/autohandler23
1 files changed, 23 insertions, 0 deletions
diff --git a/httemplate/autohandler b/httemplate/autohandler
new file mode 100644
index 000000000..e6e50d5bd
--- /dev/null
+++ b/httemplate/autohandler
@@ -0,0 +1,23 @@
+% $m->call_next;
+
+<%init>
+ dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile');
+</%init>
+
+<%filter>
+
+my $profile = '';
+if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {
+
+ #if contenttype is text/html!! **FIXME**
+
+ $profile = '<PRE>'. ("\n"x4096). encode_entities(dbh->sprintProfile()).
+ #"\n\n". &sprintAutoProfile(). '</PRE>';
+ "\n\n". '</PRE>';
+ #endif
+
+ dbh->{'private_profile'} = {};
+}
+
+s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i;
+</%filter>