This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for 2f465e08e / #123652
[perl5.git] / pod / perlfunc.pod
index 9347b60..9dc4cc6 100644 (file)
@@ -2297,6 +2297,12 @@ same underlying descriptor:
             "not have a real file descriptor\n";
     }
 
+The behavior of C<fileno> on a directory handle depends on the operating
+system.  On a system with dirfd(3) or similar, C<fileno> on a directory
+handle returns the underlying file descriptor associated with the
+handle; on systems with no such support, it returns the undefined value,
+and sets C<$!> (errno).
+
 =item flock FILEHANDLE,OPERATION
 X<flock> X<lock> X<locking>
 
@@ -2716,7 +2722,8 @@ various get routines are as follows:
  $comment,  $gcos,     $dir,       $shell,   $expire ) = getpw*
  # 5        6          7           8         9
 
-(If the entry doesn't exist you get an empty list.)
+(If the entry doesn't exist, the return value is a single meaningless true
+value.)
 
 The exact meaning of the $gcos field varies but it usually contains
 the real name of the user (as opposed to the login name) and other
@@ -4369,7 +4376,9 @@ existing variable: a package variable of the same name.
 
 This means that when C<use strict 'vars'> is in effect, C<our> lets you use
 a package variable without qualifying it with the package name, but only within
-the lexical scope of the C<our> declaration.
+the lexical scope of the C<our>
+declaration.  This applies immediately--even
+within the same statement.
 
     package Foo;
     use strict;
@@ -4395,6 +4404,16 @@ package variables spring into existence when first used.
 
     print $Foo::foo; # prints 23
 
+Because the variable becomes legal immediately under C<use strict 'vars'>, so
+long as there is no variable with that name is already in scope, you can then
+reference the package variable again even within the same statement.
+
+    package Foo;
+    use strict;
+
+    my  $foo = $foo; # error, undeclared $foo on right-hand side
+    our $foo = $foo; # no errors
+
 If more than one variable is listed, the list must be placed
 in parentheses.
 
@@ -5333,11 +5352,14 @@ error prone.
 =item prototype FUNCTION
 X<prototype>
 
+=item prototype
+
 =for Pod::Functions +5.002 get the prototype (if any) of a subroutine
 
 Returns the prototype of a function as a string (or C<undef> if the
 function has no prototype).  FUNCTION is a reference to, or the name of,
-the function whose prototype you want to retrieve.
+the function whose prototype you want to retrieve.  If FUNCTION is omitted,
+$_ is used.
 
 If FUNCTION is a string starting with C<CORE::>, the rest is taken as a
 name for a Perl builtin.  If the builtin's arguments
@@ -6978,7 +7000,8 @@ uses empty string matches as separators to produce the output
 list of its component characters.
 
 As a special case for C<split>, the empty pattern given in
-L<match operator|perlop/"m/PATTERN/msixpodualgc"> syntax (C<//>) specifically matches the empty string, which is contrary to its usual
+L<match operator|perlop/"m/PATTERN/msixpodualngc"> syntax (C<//>)
+specifically matches the empty string, which is contrary to its usual
 interpretation as the last successful match.
 
 If PATTERN is C</^/>, then it is treated as if it used the
@@ -7682,7 +7705,8 @@ list context is currently not possible this would serve no purpose.
 
 C<state> variables are enabled only when the C<use feature "state"> pragma 
 is in effect, unless the keyword is written as C<CORE::state>.
-See also L<feature>.
+See also L<feature>. Alternately, include a C<use v5.10> or later to the
+current scope.
 
 =item study SCALAR
 X<study>