Thread Getopt::Long - Parameter soll nicht optional sein (5 answers)
Opened by Michael at 2015-05-27 08:47

Linuxer
 2015-05-27 10:29
#181194 #181194
User since
2006-01-27
3870 Artikel
HausmeisterIn

user image
Ja, das bedeutet es.

JavaFan at perlmonks.org
Re: using "Getopt::Long" how to check parameter mandatory
by JavaFan on Aug 24, 2010 at 14:46 UTC

Quote
How can i control this case using Getopt::Long.


As Johan Vromans (author of Getopt::Long) tends to say "mandatory arguments aren't options". Hence, there's no build-in functionality in Getopt::Long to enforce mandatory parameters.

But you can also die afterwards if certain parameters aren't defined.

Das war als Antwort auf diese Frage: http://www.perlmonks.org/?node_id=856941

Ist zwar 4 Jahre alt, aber mir ist diesbezüglich keine Änderung an CPAN:Getopt::Long bekannt.
meine Beiträge: I.d.R. alle Angaben ohne Gewähr und auf Linux abgestimmt!
Die Sprache heisst Perl, nicht PERL. - Bitte Crossposts als solche kenntlich machen!

View full thread Getopt::Long - Parameter soll nicht optional sein