############################################################################### # Debug.pm # # $Date: 01.05.16 $ # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 2.6.12 # # Packaged: January 5, 2016 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2016 YaBB (www.yabbforum.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # ############################################################################### our $VERSION = '2.6.12'; $debugpmver = 'YaBB 2.6.12 $Revision$'; sub Debug { if ( $debug == 1 || ( $debug == 2 && ( $iamadmin || $iamgmod ) ) || $debug == 3 ) { $yyfileactions = "$debug_txt{'opened'} $file_open $debug_txt{'closed'} $file_close $debug_txt{'equal'}"; my $yytimeclock; my $time_running = time - $START_TIME; if ( $time_running == int $time_running ) { $yytimeclock = "$debug_txt{'nohires'} Time::Hires $debug_txt{'nomodule'}
"; } else { $time_running = sprintf '%.4f', $time_running; } $yytimeclock .= "$debug_txt{'pagespeed'} $time_running $debug_txt{'loaded'}."; ToHTML($openfiles); $openfiles =~ s/\n/
/gxsm; $yydebug = qq~
$debug_txt{'debugging'}

$debug_txt{'benchmarking'}:
$yytimeclock

$debug_txt{'ipaddress'}:
$user_ip

$debug_txt{'browser'}:
$ENV{'HTTP_USER_AGENT'}
$getpairs
$debug_txt{'trace'}:$yytrace

$debug_txt{'check'}:
$yyfileactions

$debug_txt{'filehandles'}:
$debug_txt{'filehandleslegend'}

$openfiles
$debug_txt{'filesloaded'}:require~; foreach ( sort keys %INC ) { $yydebug .= qq~
$_ => $INC{$_}~; } $yydebug .= q~


~; if ( $debug == 3 ) { $yydebug = qq~
$yytimeclock
~; } } return $yydebug; } 1;