On 2009 Feb 6, at 6:24, Daniel Ruoso wrote:
Em Sex, 2009-02-06 às 02:07 -0500, Brandon S. Allbery KF8NH escreveu:I would think fcntl() is just the Unix version of a more generalconcept, which is probably wider than POSIX.Maybe this wider concepts can be expressed in their own roles, asalready been suggested here, as we have IO::Readable and IO::Writeable.IO::Flock is something that looks right to me, where IO::Linux26 does IO::Flock (even if IO::POSIX doesn't). (I use flock as an example because I'm not sure how fcntl applies to a non-posix OS, since that's the name of a POSIX function).
fcntl = file descriptor control/configuration. While the name itself is POSIX, the range of possible actions described by it is larger than that.
(Yes, one could just compose roles with individual actions, thus making fcntl() disappear altogether. But you will not be thanked by someone who has to work out exactly which roles s/he needs to implement for a given "IO-like" object, nor by the unfortunate tasked with porting perl5 code.)
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
Description: This is a digitally signed message part