Index | Thread | Search

From:
Marc Espie <marc.espie.openbsd@gmail.com>
Subject:
Re: are you running under the perl debugger ?
To:
Andrew Hewus Fresh <andrew@afresh1.com>
Cc:
tech@openbsd.org
Date:
Wed, 24 Jun 2026 01:50:39 +0200

Download raw body.

Thread
On Tue, Jun 23, 2026 at 02:22:35PM -0700, Andrew Hewus Fresh wrote:
> On Tue, Jun 23, 2026 at 06:08:01PM +0200, Marc Espie wrote:
> > The following snippet:
> > 
> > can be used to determine if I am running under perl -d.
> > 
> > I'm wondering if there's something cleaner.
> 
> I asked at work and millert@'s neighbor Tom says he uses:
> 
>     sub am_running_perldb() {
>         no warnings "once";
>         return keys(%DB::sub) > 0;
>     }
> 

Nice... Indeed that's simpler.

Objections to me using some similar magic ?

Anyone having a magic way to handling eval {}; from within the debugguer ?