./devel/p5-IO-Null, Perl module for null filehandles

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: pkgsrc-2008Q2, Version: 0.02nb2, Package name: p5-IO-Null-0.02nb2, Maintainer: pkgsrc-users

This is a class for null file handles. Calling a constructor of this
class always succeeds, returning a new null file handle. Writing to
any object of this class is always a no-operation, and returns true.
Reading from any object of this class is always no-operation, and
returns empty-string or empty-list, as appropriate.

You could say:
open(NULL, '>/dev/null') || die "WHAAT?! $!";
and get a null FH that way. But not everyone is using an OS
that has a /dev/null


Master sites: (Expand)

SHA1: b23852a3009e36dbb502e0019ab47fef0ea6aa64
RMD160: e4a6367409dc3bdfbb588458dd5d9bf2e7bb6a19
Filesize: 3.803 KB

Version history: (Expand)