RE: using Getopt with subroutines

2003-11-21 Thread Freimuth,Robert
> > Since I anticipate using this module in multiple programs, > > I'd like to keep the parameter list as generic > > as possible (in terms of order and requirements). > > That is a worthy cause, but remember that the arguments > that will be passed in need to be passed in a specific order: > >

Re: using Getopt with subroutines

2003-11-20 Thread drieux
On Thursday, Nov 20, 2003, at 11:10 US/Pacific, Freimuth,Robert wrote: [..] Excellent suggestion! I should have thought of that before. (I can tell I'm tired...) Passing a hash would solve both the required/optional and parameter order problem. [..] hash is your friend. Hash References are Coole

Re: using Getopt with subroutines

2003-11-20 Thread drieux
On Wednesday, Nov 19, 2003, at 15:27 US/Pacific, Freimuth,Robert wrote: I have a subroutine that is contained within its own module and package. It currently takes 7 different arguments, but only 2 of them are required because I can set defaults for the other 5. let me see if I understand your i

Re: using Getopt with subroutines

2003-11-20 Thread Hacksaw
I don't think you'll quite be able to have it be as modular as you would like since it creates globals. I'd recommend looking at the package, since it is in plain text, make a copy and modify it to your needs. But since you have to deal with the variables it sets anyway, it seems like you coul

using Getopt with subroutines

2003-11-20 Thread Freimuth,Robert
Hello, I have a subroutine that is contained within its own module and package. It currently takes 7 different arguments, but only 2 of them are required because I can set defaults for the other 5. Since I anticipate using this module in multiple programs, I'd like to keep the parameter list as