Debug::Xray - Debugging tool to trace, log, and watch variables
Version 0.05
Debug::Xray allows you to easily instrument your code and log what happens. If you log subroutines, logging messages will be suitably indented.
use Debug::Xray; my $watcher = Debug::Xray::watch_all_subs(); my $var; add_watch_var($var);
# SIGNAL HANDLING &debug_warn_handling &default_warn_handling &debug_error_handling &default_error_handling
# LOGGING &start_sub &end_sub &dprint &set_debug_verbose &set_debug_quiet
# WATCH ROUTINES &add_watch_var &watch_subs &watch_all_subs
# TESTING OF THIS MODULE &is_carp_debug
The debug_warn_handling subroutine causes the debugging warning processing to come into effect. Warnings will be logged. Logging is written to standard input and optionally to a file.
debug_warn_handling
The default_warn_handling subroutine causes the standard warning processing to come into effect.
default_warn_handling
The debug_error_handling subroutine causes the debugging error processing to come into effect. Hopefully, all errors are logged. Logging is written to standard input and optionally to a file.
debug_error_handling
The default_error_handling subroutine causes the standard error processing to come into effect.
default_error_handling
The start_sub subroutine logs the start of a subroutine. You may insert this at the start of a subroutine or have it done automatically via the watch methods. Logging is written to standard input and optionally to a file.
start_sub
The end_sub subroutine logs the end of a subroutine. You may insert this at the end of a subroutine or have it done automatically via the watch methods. Logging is written to standard input and optionally to a file.
end_sub
The dprint subroutine logs whatever you pass to it. Currently, it takes a single scalar, so if you need to concatenate with '.' rather than ','. Logging is written to standard input and optionally to a file.
dprint
The set_debug_verbose subroutine causes logging to be written to standard input and optionally to a file.
set_debug_verbose
The set_debug_quiet subroutine turns off all debug logging.
set_debug_quiet
The add_watch_var subroutine causes logging of all changes or access to the variable being watched.
add_watch_var
The watch_subs subroutine causes logging of entries to and exits from subroutines passed in. The subroutines may be quoted.
watch_subs
The watch_all_subs subroutine causes logging of entries to and exits from all subroutines in the scope of the call.
watch_all_subs
The is_carp_debug subroutine is for debugging purposes.
is_carp_debug
NOTE: The log file is active if it is hard-coded at the top of this module. This will be fixed.
Dave Carvell, <dave_carvell at yahoo.com>
<dave_carvell at yahoo.com>
Please report any bugs or feature requests to bug-debug-xray at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Debug-Xray. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-debug-xray at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Debug::Xray
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Debug-Xray
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Debug-Xray
CPAN Ratings
http://cpanratings.perl.org/d/Debug-Xray
Search CPAN
http://search.cpan.org/dist/Debug-Xray/
Copyright 2011 Dave Carvell.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Debug::Xray, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Debug::Xray
CPAN shell
perl -MCPAN -e shell install Debug::Xray
For more information on module installation, please visit the detailed CPAN module installation guide.