Subject: | File::Path->make_path strange behavior |
Date: | Mon, 7 Dec 2015 23:34:24 +0600 |
To: | bug-File-Path [...] rt.cpan.org |
From: | sftf <sftf-misc [...] mail.ru> |
#perl -M'File::Path' -e 'print $File::Path::VERSION';
2.08_01
#perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi
(with 89 registered patches, see perl -V for more detail)
#uname -a
Linux om-b0 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u6 x86_64 GNU/Linux
Code below creates directory with name 'File::Path' in current dir.
No matter, with or without 'use File::Path qw(make_path);'
Show quoted text
--- code start ---
#!/usr/bin/perl
use File::Path qw(make_path);
File::Path->make_path('/tmp/11',{verbose => 1}); # create '/tmp/11' AND './File::Path'
--- code end ---
--- output start ---
mkdir File::Path
mkdir /tmp/11
--- output end ---
On Windows and perl v5.20.2 there is similar issue with code below.
--- code start ---
#!/usr/bin/perl
use File::Path qw(make_path);
File::Path->make_path('e:/11',{verbose => 1});
--- code end ---
--- output start ---
mkdir File::.
mkdir File::.: Invalid argument; The filename, directory name, or volume label syntax is incorrect at D:\f.pl line 3
--- output end ---
Code below (calling 'make_path' without 'File::Path->') is ok.
--- code start ---
#!/usr/bin/perl
use File::Path qw(make_path);
make_path('/tmp/11',{verbose => 1}); # create '/tmp/11' AND './File::Path'
--- code end ---