Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Getopt::Declare: multiple option lists require terminators?

by MonkE (Hermit)
on May 16, 2006 at 13:31 UTC ( [id://549749]=note: print w/replies, xml ) Need Help??


in reply to Getopt::Declare: multiple option lists require terminators?

Instead of -ws <ws_files:if>... ,    list of WS files. have you tried: -ws <ws_file> [repeatable] (untested)?

Of course your actual usage syntax would change to -ws file1.ws -ws file2.ws and so on.

Replies are listed 'Best First'.
Re^2: Getopt::Declare: multiple option lists require terminators?
by QM (Parson) on May 16, 2006 at 17:48 UTC
    That's a useful suggestion, and it works like this:
    -ws <ws_file:if> WS input file { push \@::list, \$ws_file; } [repeatable]
    However, then every input file would require its own option flag. Wildcards would have to be massaged before calling G::D->new() (not such a bad thing, as they already are, but it's more work and more places to cause problems).

    Another idea is to omit the list terminator from the spec, and preprocess the options to put an option flag in front of every unadorned file name. But then, if I'm going to do all that, I might as well process the options myself. :(

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://549749]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-20 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found