=item C<abs>
-This is identical to Perl's builtin C<abs()> function, returning
-the absolute value of its numerical argument.
+This is identical to Perl's builtin C<abs()> function, returning the absolute
+value of its numerical argument (except that C<POSIX::abs()> must be provided
+an explicit value (rather than relying on an implicit C<$_>):
+
+ $absolute_value = POSIX::abs(42); # good
+
+ $absolute_value = POSIX::abs(); # throws exception
=item C<access>
=item C<alarm>
-This is identical to Perl's builtin C<alarm()> function,
-either for arming or disarming the C<SIGARLM> timer.
+This is identical to Perl's builtin C<alarm()> function, either for arming or
+disarming the C<SIGARLM> timer, except that C<POSIX::alarm()> must be provided
+an explicit value (rather than relying on an implicit C<$_>):
+
+ POSIX::alarm(3) # good
+
+ POSIX::alarm() # throws exception
=item C<asctime>
=item C<chdir>
-This is identical to Perl's builtin C<chdir()> function, allowing
-one to change the working (default) directory, see L<perlfunc/chdir>.
+This is identical to Perl's builtin C<chdir()> function, allowing one to
+change the working (default) directory -- see L<perlfunc/chdir> -- with the
+exception that C<POSIX::chdir()> must be provided an explicit value (rather
+than relying on an implicit C<$_>):
+
+ $rv = POSIX::chdir('path/to/dir'); # good
+
+ $rv = POSIX::chdir(); # throws exception
=item C<chmod>
This is identical to Perl's builtin C<chmod()> function, allowing
-one to change file and directory permissions, see L<perlfunc/chmod>.
+one to change file and directory permissions -- see L<perlfunc/chmod> -- with
+the exception that C<POSIX::chmod()> can only change one file at a time
+(rather than a list of files):
+
+ $c = chmod 0664, $file1, $file2; # good
+
+ $c = POSIX::chmod 0664, $file1; # throws exception
+
+ $c = POSIX::chmod 0664, $file1, $file2; # throws exception
=item C<chown>
This is identical to Perl's builtin C<localtime()> function for
converting seconds since the epoch to a date see L<perlfunc/localtime> except
that C<POSIX::localtime()> must be provided an explicit value (rather than
-relying an implicit C<$_>:
+relying on an implicit C<$_>):
- @localtime = POSIX::localtime(time); # Good
+ @localtime = POSIX::localtime(time); # good
- @localtime = localtime(); # Good
+ @localtime = localtime(); # good
- @localtime = POSIX::localtime(); # Throws exception
+ @localtime = POSIX::localtime(); # throws exception
=item C<log>
my $arg_pat = join ', ', ('[a-z]+') x $valid{$func};
my $expect = qr/\AUsage: POSIX::$func\($arg_pat\) at \(eval/;
foreach my $try (@try) {
- next if $valid{$func} == $try;
- my $call = "POSIX::$func(" . join(', ', 1 .. $try) . ')';
- is(eval "$call; 1", undef, "$call fails");
- like($@, $expect, "POSIX::$func for $try arguments gives expected error")
+ next if $valid{$func} == $try;
+ my $call = "POSIX::$func(" . join(', ', 1 .. $try) . ')';
+ is(eval "$call; 1", undef, "$call fails");
+ like($@, $expect, "POSIX::$func for $try arguments gives expected error")
}
}