diff options
author | David Golden <dagolden@cpan.org> | 2010-11-28 23:12:12 -0500 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2010-11-29 15:30:50 -0500 |
commit | 15e6cdd91beb4cefae4b65e855d68cf64766965d (patch) | |
tree | 9b22cf13e30a346c10c6dce7d2531d9e002e9d62 /MANIFEST | |
parent | a812f6a926c0966af8d2a9a3d2d05fe1a5df510f (diff) | |
download | perl-15e6cdd91beb4cefae4b65e855d68cf64766965d.tar.gz |
Filehandle method calls load IO::File on demand
When a method call on a filehandle would die because the method can not
be resolved and L<IO::File> has not been loaded, Perl now loads IO::File
via C<require> and attempts method resolution again:
open my $fh, ">", $file;
$fh->binmode(":raw"); # loads IO::File and succeeds
This also works for globs like STDOUT, STDERR and STDIN:
STDOUT->autoflush(1);
Because this on-demand load only happens if method resolution fails, the
legacy approach of manually loading an IO::File parent class for partial
method support still works as expected:
use IO::Handle;
open my $fh, ">", $file;
$fh->autoflush(1); # IO::File not loaded
Diffstat (limited to 'MANIFEST')
-rw-r--r-- | MANIFEST | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4485,6 +4485,7 @@ t/io/errno.t See if $! is correctly set t/io/fflush.t See if auto-flush on fork/exec/system/qx works t/io/fs.t See if directory manipulations work t/io/inplace.t See if inplace editing works +t/io/iofile.t See if we can load IO::File on demand t/io/iprefix.t See if inplace editing works with prefixes t/io/layers.t See if PerlIO layers work t/io/nargv.t See if nested ARGV stuff works |