NAME

Modern::Open - Autovivification, Autodie, and 3-args open support

VERSION

Version 0.15

SYNOPSIS

use Modern::Open;

TABLE OF CONTENTS

"DESCRIPTION"
"INSTALLATION"
"COMPATIBILITY"
"DIAGNOSTICS"
"SEE ALSO"

DESCRIPTION

Modern::Open provides autovivification and autodie support of open(), opendir(), sysopen(), pipe(), and accept() on perl 5.00503 or later. And supports three-argument open(), too. socket() supports autovivification of the filehandle but does not autodie; it returns the result of CORE::socket() directly.

INSTALLATION

To install this module, run the following commands:

perl Makefile.PL
make
make test
make install

COMPATIBILITY

This module requires Perl 5.00503 or later and runs on all versions through the current release.

DIAGNOSTICS

Bare handle no longer supported

A bareword filehandle was passed to open(), opendir(), sysopen(), pipe(), socket(), or accept(). Use an undefined scalar variable instead.

Too many arguments for open

More than three arguments were passed to open().

Too many arguments for sysopen

More than four arguments were passed to sysopen().

Not enough arguments for open

Fewer than two arguments were passed to open().

Not enough arguments for sysopen

Fewer than three arguments were passed to sysopen().

Unknown open() mode '$mode'

An unrecognized mode string was passed as the second argument to the three-argument form of open().

Can't open(<VAR,<VAR>): <VAR>>

Died because 2-argument open() failed and the call was in void context.

Can't open(<VAR,<VAR>,<VAR>): <VAR>>

Died because 3-argument open() failed and the call was in void context.

Can't opendir(<VAR,<VAR>): <VAR>>

Died because opendir() failed and the call was in void context.

Can't sysopen(<VAR,<VAR>,<VAR>): <VAR>>

Died because 3-argument sysopen() failed and the call was in void context.

Can't sysopen(<VAR,<VAR>,<VAR>,<VAR>): <VAR>>

Died because 4-argument sysopen() failed and the call was in void context.

Can't pipe(<VAR,<VAR>): <VAR>>

Died because pipe() failed and the call was in void context.

Can't accept(<VAR,<VAR>): <VAR>>

Died because accept() failed and the call was in void context.

AUTHOR

INABA Hitoshi <ina@cpan.org>

This project was originated by INABA Hitoshi.

COPYRIGHT AND LICENSE

This software is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO