From: Reini Urban Date: Thu, 19 Jan 2012 17:27:19 +0000 (-0600) Subject: B.pm: fix and add B::IO documentation X-Git-Tag: accepted/trunk/20130322.191538~1075 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44f7f2d5b125c923d209a0a2a02187937c641493;p=platform%2Fupstream%2Fperl.git B.pm: fix and add B::IO documentation add pod to B::IO Methods and IoTYPE. fix IsSTD. --- diff --git a/ext/B/B.pm b/ext/B/B.pm index 6857ae4..4faa9f6 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 + =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