Skip to content

Commit

Permalink
Fix the wording of the Scalar::Util::export_fail diagnostic messages;…
Browse files Browse the repository at this point in the history
… also document the isbool failure one
  • Loading branch information
leonerd committed Sep 3, 2021
1 parent cbf2ab5 commit d39fbff
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions cpan/Scalar-List-Utils/lib/Scalar/Util.pm
Expand Up @@ -40,17 +40,17 @@ unless (defined &isvstring) {
sub export_fail {
if (grep { /^(?:weaken|isweak)$/ } @_ ) {
require Carp;
Carp::croak("Weak references are not implemented in the version of perl");
Carp::croak("Weak references are not implemented in this version of perl");
}

if (grep { /^isvstring$/ } @_ ) {
require Carp;
Carp::croak("Vstrings are not implemented in the version of perl");
Carp::croak("Vstrings are not implemented in this version of perl");
}

if (grep { /^isbool$/ } @_ ) {
require Carp;
Carp::croak("isbool is not implemented in the version of perl");
Carp::croak("isbool is not implemented in this version of perl");
}

@_;
Expand Down Expand Up @@ -341,16 +341,21 @@ Module use may give one of the following errors during import.
=over
=item Weak references are not implemented in the version of perl
=item Weak references are not implemented in this version of perl
The version of perl that you are using does not implement weak references, to
use L</isweak> or L</weaken> you will need to use a newer release of perl.
=item Vstrings are not implemented in the version of perl
=item Vstrings are not implemented in this version of perl
The version of perl that you are using does not implement Vstrings, to use
L</isvstring> you will need to use a newer release of perl.
=item isbool is not implemented in this version of perl
The version of perl that you are using does not implement stable boolean
tracking, to use L</isbool> you will need to use a newer release of perl.
=back
=head1 KNOWN BUGS
Expand Down

0 comments on commit d39fbff

Please sign in to comment.