Use IO handles with non-file objects
This toolkit primarily provides modules for performing both traditional and object-oriented i/o) on things other than normal filehandles; in particular, IO::Scalar, IO::ScalarArray, and IO::Lines. In the more-traditional IO::Handle front, we have IO::AtomicFile which may be used to painlessly create files which are updated atomically. And in the "this-may-prove-useful" corner, we have IO::Wrap, whose exported wraphandle() function will clothe anything that's not a blessed object in an IO::Handle-like wrapper... so you can just use OO syntax and stop worrying about whether your function's caller handed you a string, a globref, or a FileHandle.
$
pkg install p5-IO-StringyOrigin
devel/p5-IO-Stringy
Size
131KiB
License
ART10, GPLv1+
Maintainer
sunpoet@FreeBSD.org
Dependencies
1 packages
Required by
44 packages
Dependencies (1)
Required By (44)
MailScannerhivexmimedefangp5-BioPerlp5-CGI-Application-Plugin-DevPopupp5-Catalyst-Controller-SOAPp5-Class-Triggerp5-Config-IniFilesp5-Config-IniHashp5-Convert-TNEFp5-Crypt-GpgMEp5-DBIWrapperp5-Excel-Templatep5-File-Assetsp5-File-Binaryp5-Gtk2-Ex-PodViewerp5-HTML-Chunksp5-IO-Anyp5-IO-YAMLp5-Log-Dispatch-Colorfulp5-Log-Dispatch-Configp5-Mail-Boxp5-Mail-Messagep5-Markdown-Renderp5-MogileFS-Clientp5-MojoMojop5-Net-Deliciousp5-Net-FTPServerp5-Net-Flickr-Backupp5-OLE-Storage_Lite+ 14 more