PerlIO::if - Push layers conditionally
version 0.003
open my $fh, '<:if(!crlf,crlf)', $filename;
This module provides a conditional PerlIO layer.
This modules does not have to be loaded explicitly, it will be loaded automatically by using it in an open mode
The argument must have the following general syntax:
:if(condition,layer)
layer may be any layer installed on the system.
layer
condition may be any test from the following list:
condition
buffered
True if there is a buffered layer in the IO stack.
crlf
True if there is a layer doing crlf translation
can_crlf
True if there is a layer that is capable of doing crlf translation
Add more conditions
Add and ifelse pseudo-layer
Leon Timmermans <fawaka@gmail.com>
This software is copyright (c) 2011 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install PerlIO::if, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PerlIO::if
CPAN shell
perl -MCPAN -e shell install PerlIO::if
For more information on module installation, please visit the detailed CPAN module installation guide.