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

Re: [perl #86794] Problem with Fcntl inlining subroutines (e.g.S_ISDIR S_IXUSR)

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
March 24, 2011 14:21
Subject:
Re: [perl #86794] Problem with Fcntl inlining subroutines (e.g.S_ISDIR S_IXUSR)
Message ID:
20110324212136.GO4713@klangraum.plasmasturm.org
* Rebs Guarina <rebs.guarina@gmail.com> [2011-03-24 09:35]:
> Oh, I see. Thanks for the correction. I was mislead by
> S_ISDIR/S_ISLNK/S_ISREG still working in 5.10.1.

They are functions, so you were using them correctly and your
already-correct use continued to work.

> Can you point me to a document that references these changes?

No behaviour changed. The only change that happened is that
5.10.1 added code to catch incorrect uses.

So 5.10.1 did not break your code: 5.10.1 found a bug for you.

> Something with a list of things that will/will not work in
> versions 5.10 and above (for this module) would be great.
> The perldelta doc on 5.10 and 5.10.1 doesn't seem to cover
> this change;

The same things that worked before 5.10.1 will work after 5.10.1.
There has been no change in behaviour. And what works was already
documented in `perldoc -f stat`, eg.:

    $other_execute = $mode & S_IXOTH;

> 5.8.9 doesn't seem to exhibit any symptoms too.

Yes: your bug slips by unnoticed on 5.8.9.

> In addition, some clarification as to why it was silently
> misbehaving would be great for people switching from 5.8.8.

I think the error message should be better instead. Something
along the lines of

    Arguments passed to constant (see perldoc -f stat for usage)

would probably lead users directly to the right place, regardless
of whether they’re coming from <= 5.8.8 or run into it otherwise.

I’ll see if I can hack up a patch.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.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