dk / Prima

prima.eu.org
Other
108 stars 27 forks source link

Prima eats options in @ARGV #42

Closed Corion closed 7 years ago

Corion commented 7 years ago

This feels weird. The attached test fails as soon as the use Prima; statement is active. It passes when use Prima; is commented out. There seems to be a conflict between Getopt::Long and Prima, as Getopt::Long does not see all contents of @ARGV if Prima is loaded before it. For example the --help command gets eaten by Prima and it outputs:

   --openmp_threads - sets number of openmp threads
   --debug      - turns on debugging

which is unexpected

Prima-GetOptions.t.txt

dk commented 7 years ago

yes, this is known and expected. You probably want to say "use Prima::noARGV;" as a first statement

dk commented 7 years ago

However I agree that this is weird by default, and there should be better ways to interoperate with ARGV by default

dk commented 7 years ago

does it work for you with noARGV? If yes, I'll close the ticket

Corion commented 7 years ago

Sorry - yes, it works right as you said!It might need more documentation, but the code works fine ;)

Please close, -max

Am 22. November 2016 13:33:26 MEZ, schrieb Dmitry Karasik notifications@github.com:

does it work for you with noARGV? If yes, I'll close the ticket

You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/dk/Prima/issues/42#issuecomment-262229382

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.