in reply to Re: Why do poisoned null attacks still work ?
in thread Why do poisoned null attacks still work ?

A NUL byte is illegal in filenames on most OSses

And so is the pipe in Windows, yet.

>perl -wle"open my $fh, '>', 'a|' or die $!" Invalid argument at -e line 1. >dir /b a File Not Found

It doesn't behave any different from the underlaying system functionality.

So I'm expected to know the underlying function call used for each system and ignore the documentation?

There's actually a documented 'trick' that makes use of NUL characters (if you want to open a file containing trailing whitespace - this predates 3-arg open).

People use my ... if ...; too even though it's documented to be invalid Perl. The solution is to provide a better alternative (state vars and 3-arg open).

Perl core developers may be smart, but there are only a few.

You've been defending the behaviour up until now, yet you now say it's only present because noone's gotten around to fixing it?

Is that even the case, or did they reject a fix?

Replies are listed 'Best First'.
Re^3: Why do poisoned null attacks still work ?
by JavaFan (Canon) on Jul 22, 2009 at 15:58 UTC
    The solution is to provide a better alternative
    Providing a better alternative doesn't imply making the old behaviour illegal - specially not if it's documented and people rely on it. And note that my ... if ...; only worked as an artifact of the implementation - and then only under certain conditions.
    Is that even the case, or did they reject a fix?
    AFAIK, noone on p5p is considering this issue a huge problem (as far as I can see, it's not even in perltodo), and noone ever proposed to change/fix it - I cannot recall it being rejected. Which means that if you* think it's important enough to fix, you should do the work. Either by writing a patch (it's probably to late to get it into 5.10.1), or at least by lobbying your case on p5p, and finding someone else to do the work for you.

    Bitching about it on perlmonks is an inefficient way to change perl.

    *That's a generic you.

      Just an FYI for everyone, I dug through Perl's RT and found a ticket on the issue. Every comment from P5P implies it's not a bug, but officially the ticket is still open.