On Mon Feb 27 15:34:53 2012, ANDK wrote:
Show quoted text> The diff is only the single dot. Fix will be to make the comparison a
> bit more tolerant.
Find attached a patch that turns the test into a like() regexp
comparison.
--
Paul Evans
=== modified file 't/98back-compat.t'
--- t/98back-compat.t 2010-12-16 14:10:34 +0000
+++ t/98back-compat.t 2012-02-28 20:52:28 +0000
@@ -15,12 +15,14 @@
CPS->import(qw( kwhile kmap kgrep kfoldl kgenerate ));
}
-is( $warnings, <<"EOF", 'Import warnings' );
-Legacy import of kmap; use CPS::Functional 'kmap' instead at $0 line $warnline
-Legacy import of kgrep; use CPS::Functional 'kgrep' instead at $0 line $warnline
-Legacy import of kfoldl; use CPS::Functional 'kfoldl' instead at $0 line $warnline
-Legacy import of kgenerate; use CPS::Functional 'kunfold' instead at $0 line $warnline
+# Carp 1.25 added a period at the end of the message, to match core's die()
+my $re = <<"EOF";
+Legacy import of kmap; use CPS::Functional 'kmap' instead at \Q$0\E line $warnline\.?
+Legacy import of kgrep; use CPS::Functional 'kgrep' instead at \Q$0\E line $warnline\.?
+Legacy import of kfoldl; use CPS::Functional 'kfoldl' instead at \Q$0\E line $warnline\.?
+Legacy import of kgenerate; use CPS::Functional 'kunfold' instead at \Q$0\E line $warnline\.?
EOF
+like( $warnings, qr/^$re$/, 'Import warnings' );
my @ret;