Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: F_GETFL and Win32

by PodMaster (Abbot)
on Mar 08, 2006 at 04:40 UTC ( #535101=note: print w/replies, xml ) Need Help??


in reply to F_GETFL and Win32

fcntl is not supported on win32 (see perlport).

You might try using Win32API::File or simply try printing

sub _is_writable { my $fh = shift; return eval { defined print { $fh } ''; }; }
though that may not be desireable.

update: It just dawned on me that printing on a CLOSED filehandle is different error, than simply a filehandle thats not opened for writing, in which case you want to use the fileno function.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://535101]
help
Chatterbox?
[Corion]: Writing these import plugins was really nice though - in about 2 hours, I had imports for CSV, YAML and JSON, and adding XLS(X), SQLite (or DBI) data sources is also trivial. I'm idly wondering about separating the plugin into transport+parser, so ...
[Corion]: ... http:// URLs could be retrieved and then parsed, but I think that that would be overkill for a toy static site generator ;)
[Corion]: This is a toy clone of Jekyll, currently named MrHyde. But maybe I'll change that name to Jokel / Yokel, or some other play on the name , still mildly unfunny ;)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2018-05-22 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?