markpitchless / moosex-getopt-usage

Perl Moose Role to use with MooseX::Getopt to generate a coloured usage message from your classes meta
2 stars 2 forks source link

"number expected" vs "integer number expected" #16

Open eserte opened 3 weeks ago

eserte commented 3 weeks ago

t/basic.t fails on some of my smoker systems, possibly because of a diagnostic string change in Getopt::Long:

#   Failed test 'errors.pl --doom=lots; stdout like (?^:^Value "lots" invalid for option doom \(number expected\)\nUsage)'
#   at /home/cpansand/.cpan/build/2024093020/MooseX-Getopt-Usage-0.24-1/t/lib/Basic/Test.pm line 29.
#   (in Basic::Test->cmd_line_errors)
#                   'Value "lots" invalid for option doom (integer number expected)
# Usage:
#     errors.pl [OPTIONS]
# 
# Options:
#      --help -? --usage   - Bool. Display the usage message and exit
#      --man               - Bool. Display man page
#      --verbose           - Bool. 
#      --doom              - Int. 
#      --missile_launchers - OnOffAuto. Default=auto.
# 
# '
#     doesn't match '(?^:^Value "lots" invalid for option doom \(number expected\)\nUsage)'
# Looks like you failed 1 test of 9.
t/basic.t .......................... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/9 subtests 
eserte commented 3 weeks ago

A possible patch: https://cpan.metacpan.org/authors/id/S/SR/SREZIC/patches/MooseX-Getopt-Usage-0.24-issue16.patch

CPAN.pm users may use the following distroprefs file for automatic patching: https://github.com/eserte/srezic-cpan-distroprefs/blob/master/MooseX-Getopt-Usage.yml