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

Re: use warnings ':most'

Thread Previous | Thread Next
Joseph Brenner
June 6, 2021 15:00
Re: use warnings ':most'
Message ID:
Eric Brine <> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About