This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
join() with an empty list and undef separator may not warn in the future
[perl5.git] / t / op / join.t
index 477c479..f98b5db 100644 (file)
@@ -76,6 +76,9 @@ is( $f, 'baeak', 'join back to self, self is join character');
   use warnings "uninitialized";
   my $s = join(undef, ());
   is( $s, '', 'join should return empty string for empty list, when separator is undef');
   use warnings "uninitialized";
   my $s = join(undef, ());
   is( $s, '', 'join should return empty string for empty list, when separator is undef');
+  # this warning isn't normative, the implementation may choose to
+  # not evaluate the separator as a string if the list has fewer than
+  # two elements
   like $w, qr/^Use of uninitialized value in join/, "should warn if separator is undef";
 }
 
   like $w, qr/^Use of uninitialized value in join/, "should warn if separator is undef";
 }