develooper Front page | perl.perl5.changes | Postings from October 2020

[Perl/perl5] d47b86: t/ De-prototype to allow for arrayref

James E Keenan via perl5-changes
October 23, 2020 23:16
[Perl/perl5] d47b86: t/ De-prototype to allow for arrayref
Message ID:
  Branch: refs/heads/jkeenan/ext-POSIX-t-posix-locales_enabled
  Commit: d47b8636a444fc66be8bf9417a09bbe0cc52bb4f
  Author: James E Keenan <>
  Date:   2020-10-23 (Fri, 23 Oct 2020)

  Changed paths:
    M ext/POSIX/t/posix.t
    M t/

  Log Message:
  t/ De-prototype to allow for array ref

Running ext/POSIX/t/posix.t with warnings enabled generated a
compile-time error, "Useless use of a constant ("NUMERIC") in void
context".  Analysis suggested it was a problem with t/
function locales_enabled(), which was prototyped to accept an optional
scalar reference but not an array reference.  Experimentation suggested
that the best way out of this problem was not to prototype the function.
Rather, account for the possibility that locales_enabled() would take an
array reference as well as existing cases of scalar and no argument at

For : GH #18245 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About