Devel::FileBreaker - set breakpoints in all subroutines in one or more files
0.03
$ perl -d:FileBreaker=file1,regexp2 script_to_debug.pl
Devel::FileBreaker seeks to simplify the process of settings breakpoints in a collection of subroutines in a Perl source file or set of files.
Devel::FileBreaker
This module was inspired by a StackOverflow question.
To use this module, pass this command-line argument to perl
perl
-d:FileBreaker=pattern[,pattern2[,...]]
where pattern, pattern2, etc. are any valid perl regular expressions. In the CHECK phase of the program, a breakpoint will be set at the start of any subroutine defined in a file name (given by the values of %DB::sub) that matches one of the given regular expressions. This includes any anonymous subroutines defined in the files that are known at compile time.
pattern
pattern2
CHECK
%DB::sub
Set a breakpoint in all subs in the module Floop::Blert and all Floop::Blert submodules:
Floop::Blert
perl -d:FileBreaker=Floop/Blert ...
Set a breakpoint in all subs just in module Floop::Blert:
perl -d:FileBreaker=Floop/Blert.pm ...
Set a breakpoint in every known subroutine:
perl -d:FileBreaker=^ ...
Set a breakpoint in all subroutines from one of your subdirectories
perl -d:FileBreaker=$HOME/site_perl/mylib ...
This module is part of the Devel::ModuleBreaker distribution. See Devel::ModuleBreaker for support information about this module.
Devel::ModuleBreaker, Devel::SubBreaker
Marty O'Brien, <mob at cpan.org>
Copyright 2018 Marty O'Brien
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 Devel::ModuleBreaker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::ModuleBreaker
CPAN shell
perl -MCPAN -e shell install Devel::ModuleBreaker
For more information on module installation, please visit the detailed CPAN module installation guide.