Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Getopt-Lucid CPAN distribution.

Report information
The Basics
Id: 20938
Status: resolved
Priority: 0/
Queue: Getopt-Lucid

People
Owner: Nobody in particular
Requestors: metaperl [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.14
Fixed in: (no value)



Subject: simple example with Param() fails
The attached program fails to validate mode when called: perl go.pl --mode test Default 'mode' = '' fails to validate
Subject: go.pl
use strict; use Getopt::Lucid qw( :all ) ; my @specs = ( Switch("send|s"), Param( "mode|m", qr/(test|live)/ )->required ); my $opt = Getopt::Lucid->getopt(\@specs); warn $opt->get_mode;
Param options with validation used to always need a default that was valid. I'm releasing version 0.16 that relaxes that restriction for options that are required, as 'require' makes 'default' irrelevant. Documentation is updated as well to clarify the semantics for validation.