-
Notifications
You must be signed in to change notification settings - Fork 603
Description
Where
https://perldoc.perl.org/perldebguts
Description
Note that if &DB::sub needs external data for it to work, no subroutine call is possible without it. As an example, the standard debugger's &DB::sub depends on the $DB::deep variable (it defines how many levels of recursion deep into the debugger you can go before a mandatory break). If $DB::deep is not defined, subroutine calls are not possible, even though &DB::sub exists.
Here it is not clear what standard debugger means.
Here $DB::deep is mentioned, but it is not clear it has specific functionality or the same as $A::foo on which $DB::sub could depend.
It would be nice to move from this page all information which is related to perl5db.pl and place it there. Mentioning it here creates a lot of ambiguity. It creates more questions than gives answers.
Note that if &DB::sub needs external data for it to work, no subroutine call is possible without it.
{
package DB;
sub DB {}
sub sub {print ++$i, " $sub\n"; &$sub}
}
It prints the sequence number of each subroutine call and the name of the called subroutine. Note that &DB::sub is being compiled into the package DB through the use of the package directive.
When it starts, the debugger reads your rc file (./.perldb or ~/.perldb under Unix), which can set important options. (A subroutine (&afterinit) can be defined here as well; it is executed after the debugger completes its own initialization.)
This is not true. Having the debugger depicted in the example will read nothing from a file system.
It should be explicitly stated that the implementation of perl5db.pl reads those files.