On Jul 5, 2005, at 4:44 AM, Johan Vromans wrote:

... I now strongly lean towards _not_ creating an additional
entry point for this functionality. While GetOptionsFromArray seems
nice, there's also a reason for GetOptionsToHash,
GetOptionsWithNonStandardIntroducer and so on. This would make code
and maintenance unneccessarily complex.

You could easily add a method that accepted named parameters instead of positional (which IMO would improve readability a lot):

GetOptions(from => [EMAIL PROTECTED],
           described_by => ["length=i", file=s", "verbose"],
           to => \%args,
           ...);

IMO that's usually the right way to make the interface when there are lots of different orthogonal options that the caller might want to employ.

How you name the parameters would be up to you, of course.

 -Ken

Reply via email to