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
[perl5.git] / 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'.