On Wed, Feb 23, 2022, at 8:13 AM, Ovid via perl5-porters wrote: > On Wednesday, 23 February 2022, 14:03:47 CET, Leon Timmermans <fawaka@gmail.com> wrote: > > You can check if $^P is not 0? > > I never knew about that particular variable. If it's stable and guaranteed (I would assume yes to both), it would be nice to add that to the perldebug POD (at least on v5.26 I don't see it in there). > > If that's considered the best canonical approach, I'm happy to submit a PR. I think that's the best way. This tells you that "something is doing something with debug facilities," which may not mean that perl5db.pl is being used to debug. For that, maybe you'd look at $DB::header, but this is a losing battle. $^P tells you that the -d switch was passed, more or less. -- rjbsThread Previous | Thread Next