diff options
Diffstat (limited to 'httemplate/autohandler')
-rw-r--r-- | httemplate/autohandler | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/httemplate/autohandler b/httemplate/autohandler index a3f7eb008..ad0ab8ba6 100644 --- a/httemplate/autohandler +++ b/httemplate/autohandler @@ -9,7 +9,15 @@ if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { if ( lc($r->content_type) eq 'text/html' ) { - $profile = '<PRE>'. encode_entities(dbh->sprintProfile()). + # barely worth it, just in case someone tries to use profiling on a + # non-RT install + eval "use Text::Wrapper;"; + die $@ if $@; + + my $wrapper = new Text::Wrapper( columns => 80 ); + + $profile = '<PRE>'. + encode_entities( $wrapper->wrap( dbh->sprintProfile() ) ). #"\n\n". &sprintAutoProfile(). '</PRE>'; "\n\n". '</PRE>'; } |