diff options
author | ivan <ivan> | 2003-09-28 02:36:18 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-09-28 02:36:18 +0000 |
commit | c8f80bd5aaeb0f3844a7cece4bfe250d4f89f745 (patch) | |
tree | 66edb155311f88b162e7073e2c6c14ac33c56db5 /htetc/global.asa | |
parent | c2a0b1b8e9d437434e326a3b573d7134c5697213 (diff) |
add upload of batch result from TD Canada Trust
some global.asa / handler.pl enhancements
Diffstat (limited to 'htetc/global.asa')
-rw-r--r-- | htetc/global.asa | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/htetc/global.asa b/htetc/global.asa index 5b0ac4991..f00ae57f5 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -9,6 +9,7 @@ use CGI; use Date::Format; use Date::Parse; use Time::Local; +use File::Basename; use Tie::IxHash; use HTML::Entities; use IO::Handle; @@ -195,5 +196,36 @@ sub include { $Response->Include(@_); } +if ( defined(@DBIx::Profile::ISA) ) { + + #false laziness w/above + *redirect = sub { + my($location) = @_; + + ${$Response->{BinaryRef}} = + $cgi->header. + qq!<HTML><BODY>Redirect to <A HREF="$location">$location</A>!. + '<BR><BR><PRE>'. + ( UNIVERSAL::can(dbh, 'sprintProfile') + ? encode_entities(dbh->sprintProfile()) + : 'DBIx::Profile missing sprintProfile method;'. + 'unpatched or too old?' ). + "\n\n". &sprintAutoProfile(). '</PRE>'. + '</BODY></HTML>'; + + dbh->{'private_profile'} = {}; + + $Response->End; + + }; + +} else { + + *redirect = sub { + $Response->Redirect(@_); + } + +} + 1; |