Devel::SubBreaker - set breakpoints in many arbitrary subroutines simultaneously
0.03
$ perl -d:SubBreaker=sub1,sub2,Module3,regexp4 script_to_debug.pl
Devel::SubBreaker seeks to simplify the process of settings breakpoints in a collection of subroutines from a distribution, a single module, or just any subroutine name that matches an arbitrary pattern. It does not require the debugger user to enumerate the subroutines to be stepped through, so it is useful for unfamiliar distributions or distributions under development where subroutine names may be in flux.
Devel::SubBreaker
This module was inspired by a StackOverflow question.
To use this module, pass this command-line argument to perl
perl
-d:SubBreaker=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 whose fully qualified subroutine name (given by %DB::sub) matches one of the given regular expressions. This includes anonymous subroutines that are known at compile time.
pattern
pattern2
CHECK
%DB::sub
Set a breakpoint in all subs in module Floop::Blert and all Floop::Blert submodules:
Floop::Blert
perl -d:SubBreaker=^Floop::Blert ...
Set a breakpoint in all subs just in module Floop::Blert:
perl -d:SubBreaker=^Floop::Blert::\\w+$ ...
Set a breakpoint in every known subroutine:
perl -d:SubBreaker=^ ...
Set a breakpoint in all anonymous subroutines
perl -d:SubBreaker=__ANON__ ...
This module is part of the Devel::ModuleBreaker distribution. See Devel::ModuleBreaker for support information about this module.
Devel::ModuleBreaker, Devel::FileBreaker
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.