develooper Front page | perl.perl5.porters | Postings from May 2018

Re: [perl #133210] Warning on nonexistent bareword filehandle

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
May 18, 2018 08:25
Subject:
Re: [perl #133210] Warning on nonexistent bareword filehandle
Message ID:
20180518082459.GN2811@iabyn.com
On Thu, May 17, 2018 at 06:00:37AM -0700, Ed Avis via RT wrote:
> Sorry, of course it does warn if 'use warnings' is on.
> 
> I do still think a compile-time, rather than run-time diagnostic would be superior.

It already is a compile-time diagnostic:

    $ perl -wce 'use strict; print FOO 55'
    Name "main::FOO" used only once: possible typo at -e line 1.
    -e syntax OK
    $ perl -wce 'use strict; print FOO'
    Name "main::FOO" used only once: possible typo at -e line 1.
    -e syntax OK


-- 
Modern art:
    "That's easy, I could have done that!"
    "Ah, but you didn't!"

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