This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
prevent t/Functions.t from warning on undefined values when none supplied
authorTony Cook <tony@develop-help.com>
Thu, 1 Nov 2018 02:44:52 +0000 (13:44 +1100)
committerTony Cook <tony@develop-help.com>
Thu, 1 Nov 2018 02:45:55 +0000 (13:45 +1100)
dist/PathTools/lib/File/Spec/Win32.pm

index 0cf0e28..69acc58 100644 (file)
@@ -137,7 +137,7 @@ sub catfile {
     # Legacy / compatibility support
     #
     shift, return _canon_cat( "/", @_ )
-       if $_[0] eq "";
+       if !@_ || $_[0] eq "";
 
     # Compatibility with File::Spec <= 3.26:
     #     catfile('A:', 'foo') should return 'A:\foo'.