diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-08-31 15:20:56 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-09-01 21:54:13 +0200 |
commit | 11e7c26f941847c62a5adb54686102ec250a8dad (patch) | |
tree | d04abeb09e0c5c6223f9e593bee5d9137c198b79 /ext/POSIX/t | |
parent | 8fe37eeda0ab69220877c0b1af801830a88f0944 (diff) | |
download | perl-11e7c26f941847c62a5adb54686102ec250a8dad.tar.gz |
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.
Diffstat (limited to 'ext/POSIX/t')
-rw-r--r-- | ext/POSIX/t/unimplemented.t | 3 |
1 files changed, 2 insertions, 1 deletions
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"); |