Subject: | Eliminate git/set prefixes |
Date: | Thu, 1 Sep 2011 16:17:58 -0400 |
To: | bug-Getopt-Lucid [...] rt.cpan.org |
From: | David Golden <dagolden [...] cpan.org> |
Capturing a conversation with John Jobson.
Show quoted text
---------- Forwarded message ----------
From: David Golden <dagolden@cpan.org>
Date: Thu, Aug 25, 2011 at 12:38 PM
Subject: Re: Getopt::Lucid
To: John Jobson <mrjobson@gmail.com>
Hi, John.
I understand the distaste for "get_XXX". The flip side is the it's a
safe way to name them, as it won't conflict with any of the native
methods now or in the future. I'd hate to break someone's code
because I added a method that conflicts with someone's name for an
option.
Let me give it some thought. One possibility would be to create a
"finalized" options object that you can call only option accessors on,
but none of the other Getopt::Lucid methods.
my $opt = Getopt::Lucid->getopt($spec)->finalized;
say "saw --foo" if $opt->foo;
What do you think about that sort of approach?
-- David