0x0002291c, /* link */
0x0002291c, /* symlink */
0x0001368c, /* readlink */
- 0x0012291c, /* mkdir */
+ 0x0013299c, /* mkdir */
0x0001379c, /* rmdir */
0x0002c814, /* open_dir */
0x0000d600, /* readdir */
link link ck_fun isT@ S S
symlink symlink ck_fun isT@ S S
readlink readlink ck_fun stu% S?
-mkdir mkdir ck_fun isT@ S S?
+mkdir mkdir ck_fun isTu@ S? S?
rmdir rmdir ck_fun isTu% S?
# Directory calls.
=item mkdir FILENAME
+=item mkdir
+
Creates the directory specified by FILENAME, with permissions
specified by MASK (as modified by C<umask>). If it succeeds it
returns true, otherwise it returns false and sets C<$!> (errno).
-If omitted, MASK defaults to 0777.
+If omitted, MASK defaults to 0777. If omitted, FILENAME defaults
+to C<$_>.
In general, it is better to create directories with permissive MASK,
and let the user modify that with their C<umask>, than it is to supply
lt ($$)
m undef
map undef
-mkdir ($;$)
+mkdir ()
msgctl ($$$)
msgget ($$)
msgrcv ($$$$$)
-#!./perl
+#!./perl -w
BEGIN {
chdir 't' if -d 't';
require './test.pl';
}
-plan tests => 13;
+plan tests => 22;
use File::Path;
rmtree('blurfl');
ok(rmdir('blurfl///'));
ok(!-d 'blurfl');
}
+
+# test default argument
+
+$_ = 'blurfl';
+ok(mkdir);
+ok(-d);
+ok(rmdir);
+ok(!-d);
+$_ = 'lfrulb';
+
+{
+ my $_ = 'blurfl';
+ ok(mkdir);
+ ok(-d);
+ ok(-d 'blurfl');
+ ok(!-d 'lfrulb');
+ ok(rmdir);
+}