develooper Front page | perl.perl5.porters | Postings from June 2021

Re: use warnings ':most'

Thread Previous | Thread Next
From:
Joseph Brenner
Date:
June 6, 2021 15:00
Subject:
Re: use warnings ':most'
Message ID:
CAFfgvXUW02y6CRmNo3yZ3kYdVNsP-2rvbLxFmgNQ3bx_BqeWoQ@mail.gmail.com
Eric Brine <ikegami@adaelis.com> wrote:

> But why would you want to turn off "once" warning?!

     { no warnings 'once'; $DB::single = 1; }

That's tells the perl debugger you want to pause at that point in the code.
It's good for skipping past a lot of initialization (I don't have any interest
in stepping through the code for Moo, for example), and does nothing at
all if you're not running the debugger.  This single use of "single" is
guaranteed to produce a "once" warning if you don't silence it.

I would say a bigger problem is the 'uninitialized' warning, but I gather that
one's not on the table.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About