summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorReini Urban <rurban@x-ray.at>2012-01-19 11:27:19 -0600
committerFather Chrysostomos <sprout@cpan.org>2012-01-19 16:59:21 -0800
commit44f7f2d5b125c923d209a0a2a02187937c641493 (patch)
tree2cd19f308db29f64bc501d30f8f6a220f99e8326 /ext
parentc0154fe2bd17357e30a7ba514ff85739fa430250 (diff)
downloadperl-44f7f2d5b125c923d209a0a2a02187937c641493.tar.gz
B.pm: fix and add B::IO documentation
add pod to B::IO Methods and IoTYPE. fix IsSTD.
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B.pm31
1 files changed, 28 insertions, 3 deletions
diff --git a/ext/B/B.pm b/ext/B/B.pm
index 6857ae4d56..4faa9f6950 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -883,6 +883,14 @@ If you're working with globs at runtime, and need to disambiguate
=head2 B::IO Methods
+B::IO objects derive from IO objects and you will get more information there.
+
+For example:
+
+ $gvio = B::svref_2object(\*main::stdin)->IO;
+ $IO = $gvio->object_2svref();
+ $fd = $IO->fileno();
+
=over 4
=item LINES
@@ -909,14 +917,31 @@ If you're working with globs at runtime, and need to disambiguate
=item IoTYPE
+A character symbolizing the type of IO Handle.
+
+ - STDIN/OUT
+ I STDIN/OUT/ERR
+ < read-only
+ > write-only
+ a append
+ + read and write
+ s socket
+ | pipe
+ I IMPLICIT
+ # NUMERIC
+ space closed handle
+ \0 closed internal handle
+
=item IoFLAGS
+See F<perliol.h>
+
=item IsSTD
-Takes one arguments ( 'stdin' | 'stdout' | 'stderr' ) and returns true
+Takes one argument ( 'stdin' | 'stdout' | 'stderr' ) and returns true
if the IoIFP of the object is equal to the handle whose name was
-passed as argument ( i.e. $io->IsSTD('stderr') is true if
-IoIFP($io) == PerlIO_stdin() ).
+passed as argument. i.e. $io->IsSTD('stderr') is true if
+IoIFP($io) == PerlIO_stderr().
=back