Markdown.pl: simplify options parsing code
commit2a265e3923d0b3ed94659c213ae666149b6b7acc
authorKyle J. McKay <mackyle@gmail.com>
Tue, 8 Sep 2020 16:58:23 +0000 (8 09:58 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 8 Sep 2020 16:58:23 +0000 (8 09:58 -0700)
treece4152cc0b6307f6195ba6f582ac6073a6f32929
parent003134a723a9166e8ea80efab4818ca97bdbc3f1
Markdown.pl: simplify options parsing code

Make use of more of the Getopt::Long::GetOptions API capabilities
to avoid needing extra, awkward code checks.

With this change, options that support negation (e.g. "stylesheet")
or have variants (e.g. "validate-xml-internal") now work as intended
such that the last option given wins.

Additionally, help/version options are now handled immediately
when encountered.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Markdown.pl