3 dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile');
8 if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {
10 if ( lc($r->content_type) eq 'text/html'
11 && $FS::CurrentUser::CurrentUser->option('show_db_profile')
15 ## barely worth it, just in case someone tries to use profiling on a
17 #eval "use Text::Wrapper;";
20 my $text = dbh->sprintProfile();
23 $profile = '<PRE>'. encode_entities( $text ). "\n\n". '</PRE>';
27 #well, could do this without sprintProfile, but definiately don't want it on
28 #unless DBIx::Profile is loaded
29 if ( $FS::CurrentUser::CurrentUser->option('save_db_profile') ) {
30 #my $file = %%%FREESIDE_LOG%%%; #substitute here? maybe get from FS.pm?
31 my $file = '/usr/local/etc/freeside/'; #bah
32 $file .= "dbix_profile.$$.". time;
33 dbh->setLogFile($file);
37 dbh->{'private_profile'} = {};
40 s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i;