X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=htetc%2Fglobal.asa;h=5b0ac49916da0c8d81a95007038b34128bca4bfa;hp=6f76fd2565be092b16d4900896fb72b1eed2da1e;hb=ef7bb336cc67f127fb1d77532ad3da1369c0ae36;hpb=58d44fbe5eb9ab32e6d87063a4a3b22ddba9a828 diff --git a/htetc/global.asa b/htetc/global.asa index 6f76fd256..5b0ac4991 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -72,7 +72,8 @@ sub Script_OnStart { &cgisuidsetup($cgi); $p = popurl(2); #print $cgi->header( '-expires' => 'now' ); - dbh->{'private_profile'} = {} if dbh->can('sprintProfile'); + #dbh->{'private_profile'} = {} if dbh->can('sprintProfile'); + dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile'); #really should check for FS::Profiler or something # Devel::AutoProfiler _our_ VERSION? thanks a fucking lot @@ -109,7 +110,7 @@ sub Script_OnFlush { #$$ref = $cgi->header() . $$ref; #warn "Script_OnFlush called with dbh ". dbh. "\n"; #if ( dbh->can('sprintProfile') ) { - if ( UNIVERSAL::can(dbh,'sprintProfile') ) { + if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { #warn "dbh can sprintProfile\n"; if ( lc($Response->{ContentType}) eq 'text/html' ) { #con #warn "contenttype is sprintProfile\n"; @@ -136,8 +137,12 @@ if ( defined(@DBIx::Profile::ISA) ) { my( $self, $location) = @_; my $page = $cgi->header. - qq!Redirect to $location

!. - '
'. encode_entities(dbh->sprintProfile()).
+      qq!Redirect to $location!.
+      '

'.
+        ( UNIVERSAL::can(dbh, 'sprintProfile')
+            ? encode_entities(dbh->sprintProfile())
+            : 'DBIx::Profile missing sprintProfile method;'.
+              'unpatched or too old?'                        ).
       "\n\n". &sprintAutoProfile().  '
'. ''; dbh->{'private_profile'} = {}; @@ -186,5 +191,9 @@ sub sprintAutoProfile { } +sub include { + $Response->Include(@_); +} + 1;