Re: are you running under the perl debugger ?

Marc Espie <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
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 ?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.