From 11e7c26f941847c62a5adb54686102ec250a8dad Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 31 Aug 2011 15:20:56 +0200 Subject: In POSIX, improve the diagnostic for the "use $method" instead. In the error message, name the POSIX function that was called, as well as the suggested replacement method. This rephrasing was in the patch supplied by Aristotle Pagaltzis, but I have retained the existing POSIX use of :: when describing the method, because given two less than great choices, I'm inclined to favour retaining the status quo and one change over two changes. --- ext/POSIX/t/unimplemented.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/POSIX/t') diff --git a/ext/POSIX/t/unimplemented.t b/ext/POSIX/t/unimplemented.t index 54fc648489..1e38af7d4a 100644 --- a/ext/POSIX/t/unimplemented.t +++ b/ext/POSIX/t/unimplemented.t @@ -89,7 +89,8 @@ foreach ([atexit => 'C-specific, use END {} instead'], [vsprintf => 'C-specific, stopped'], ) { my ($func, $action) = @$_; - my $expect = ref $action ? qr/Use method $$action\(\) instead at \(eval/ + my $expect = ref $action + ? qr/Use method $$action\(\) instead of POSIX::$func\(\) at \(eval/ : qr/Unimplemented: POSIX::$func\(\) is \Q$action\E at \(eval/; is(eval "POSIX::$func(); 1", undef, "POSIX::$func fails as expected"); like($@, $expect, "POSIX::$func gives expected error message"); -- cgit v1.2.1