develooper Front page | perl.perl5.porters | Postings from March 2013

Re: [perl #117265] [PATCH] e213661 no warnings 'safesyscalls', fatalnul checks

Thread Previous | Thread Next
From:
Reini Urban
Date:
March 24, 2013 13:16
Subject:
Re: [perl #117265] [PATCH] e213661 no warnings 'safesyscalls', fatalnul checks
Message ID:
CAHiT=DFfCr50Po4hw3-bqusP=kT1bo0NaNnA=T9mxF=CMLAvtg@mail.gmail.com
On Sat, Mar 23, 2013 at 7:11 PM, Ricardo Signes
<perl.p5p@rjbs.manxome.org> wrote:
> * Lukas Mai <plokinom@gmail.com> [2013-03-23T11:34:47]
>> >I explicitly allow typical harmless programmer errors adding another \0
>> >at the end.
>>
>> My favorite semantics would be to not treat \0 specially, regardless of
>> warnings. That means failing with ENOENT if you pass such a string to
>> open, unlink, stat, ... etc, because as far as Perl is concerned, there
>> is a \0 in that string, and as far as the file system is concerned, no
>> such file exists. Similarly, glob("*\0") should return ().

>tomc:
>Hold on.  You cannot have a fatal warning without asking for one.
>
>A use warnings pragma must never raise an exception simply because you
>asked for a warning.  That's what "use warnings FATAL => blah" is for.

You are right, my mistake. I was fooled by the existing severe
DEFAULT_ON categories.

I'll ditch the severe warnings category and go to ENOENT + return undef,
with optional warnings if enabled.

I'm also not sure if I missed the most important part: nul in pp_require args.
I forgot a testcase for that.
-- 
Reini Urban
http://cpanel.net/   http://www.perl-compiler.org/

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