From perl #1726. Consider:
#!perl
use strict;
use warnings;
sub problem {
$SIG{__DIE__} = sub {
die "<b problem> will set a break point here.\n"
};
warn "This line will run even if you enter <c problem>.\n";
}
problem();
exit(0);
(This is example/sub-brkpt-bug.pl in git and this may be related to a Module::Signature bug in example/signature.pl)
Setting a breakpoint on problem sets the breakpoint on the "die" statement which is wrong. It so happens that the first breakable line is the line after that which contains };.
Possibly the best fix is to run the breakpoint from &DB::sub rather than try to convert the subroutine into a line number.