[Quoting Sam Vilain, on June 27 2005, 11:35, in "Re: Getopt::Long wis"]
> Johan Vromans wrote:
> > You mean, you are going to pass things like STDOUT, STDERR, ENV and so
> > on, to every function that may use them? [1]
> > Global things are intended to be global, I'd say.
> 
> This is why code using CGI.pm is so hard to wrap, too.  Assumptions that
> globals will always be globals.
> 
> Then you go and try and do anything vaguely re-entrant and it all falls
> to pieces.

I think there's a fundamental difference between user variables that
are used globally (which, indeed, expose the problem you mentioned)
and variables that are global by design, like STDOUT and ARGV.

Anyway, the next version of Getopt::Long will have the ability to use
an arbitrary array instead of ARGV. 

Now, do you want this to be yet another "if the first argument is an
array reference ..." or yet another :config option?

-- Johan

Reply via email to