Front page | perl.perl6.language |
Postings from November 2008
Re: S16: chown, chmod
Thread Previous
|
Thread Next
From:
dpuu
Date:
November 24, 2008 07:45
Subject:
Re: S16: chown, chmod
Message ID:
61c109f4-3f73-4707-bbf8-1b63ea7b8b75@z6g2000pre.googlegroups.com
On Nov 23, 4:55 pm, pagalt...@gmx.de (Aristotle Pagaltzis) wrote:
> I don’t see any examples in S16 concerning error handling anyway,
> but even so I don’t see how relying on exceptions would could
> possibly be more complex than guard clauses.
Neither do I. Catching Failure objects is better than explicit checks
(except where performance implications exist and are relevant to the
application -- which isn't the case here).
Dave.
PS. From S16, q{ ... On POSIX systems, you can detect this condition
this way:
use POSIX qw(sysconf _PC_CHOWN_RESTRICTED);
$can_chown_giveaway = not sysconf(_PC_CHOWN_RESTRICTED);
}
From this I inferred that the purpose of this assignment was to do a
check -- I apologize if I misinterpreted it -- and would suggest that
we should either get rid of that text, or else reword to suggest not
using it in bad ways.
Thread Previous
|
Thread Next