This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
under -Dusedl there are no warnings about the other dl_ functions
authorTony Cook <tony@develop-help.com>
Fri, 16 Nov 2012 11:14:16 +0000 (22:14 +1100)
committerTony Cook <tony@develop-help.com>
Fri, 16 Nov 2012 11:14:16 +0000 (22:14 +1100)
without usedl, the warnings are like:

Subroutine DynaLoader::dl_error redefined at (eval 1) line 2
... warnings about every other DynaLoader function
Subroutine DynaLoader::dl_error redefined at (eval 2) line 2

with usedl, only dl_error is defined, so the other warnings disappear,
since the regexp expected two new-lines between the dl_error warnings
the test failed.

The change makes one of the newlines optional.

t/lib/warnings/op

index 69c3cd3..52b35b6 100644 (file)
@@ -1522,6 +1522,6 @@ EOC
 EXPECT
 OPTION regex
 \ASubroutine DynaLoader::dl_error redefined at \(eval 1\) line 2\.
-(?s).*
+?(?s).*
 Subroutine DynaLoader::dl_error redefined at \(eval 2\) line 2\.
 ########