On Oct 31, 2010, at 6:45 PM, Xiong Changnian via RT wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=62599 >
>
> Thanks for reporting, Mike. That sure is a bug. I'm not quite sure how
> to fix it -- like you, I'm unsure of my intent. I committed to drop-in
> replacement compatibility with Smart::Comments throughout v1.x.x which
> would seem to mean I respect any one of the 4 alternate spellings of
> 'Smart_Comments' (or at least the one documented for S::C).
>
> One reason I forked instead of submitting a patch was that I disagree
> somewhat with a lot of the overall approach of S::C. That POD documents
> only $ENV{Smart_Comments} but the code supports 4 variants. I can see
> *why*; but I don't agree. If S::C supported only what was documented,
> I'd probably have supported both 'Devel_Comments' and 'Smart_Comments'.
> I think I felt icky about supporting a total of 8 variants.
>
> Complicating this, in my head at least, was that increasing the number
> of possible use-line arguments demands a new calling syntax and a
> considerable improvement in argument parsing. I have not done this yet;
> the argument parser is half the old Conway code and half stuff I jammed
> in. Therefore, as I did document, you can't use either flat list or
> named parameter calling syntax for all options. Building a clean
> argument parser is, I guess, the hot task. But that shouldn't really
> impede a bugfix for your report.
>
> I'm going to say, Mike, that since you're the fellow who took the time
> to report this, you get to pick. I can rewrite the POD to match the
> code; rewrite the code to match the POD; or support some other set of
> environment variables and rewrite both. Any of these is an easy task and
> I'll be delighted to please you.
>
> Thanks again for bringing this up.
My first thought would be to make the $ENV{Smart_Comments} family of environment variables "second class" - only used if there was no $ENV{Devel_Comments} environment variable found.
That way people using Devel::Comments as a drop-in would still be able to use it that way, and people wanting to use more advanced features through the environment would start using $ENV{Devel_Comments}. You would only have to upgrade and maintain $ENV{Devel_Comments} with one spelling, and could deprecate $ENV{Smart_Comments} in a later release.
To avoid documentation issues I would refer people to Smart::COmments documentation if they want to use the Smart_Comments variable, and you can then develop the functionality of Devel_Comments without worrying about backward compatibility.
Well those are my 2 cents, I'll think about it at the weekend some more!
Regards,
Mike
--
Mike Stok <mike@stok.co.uk>
http://www.stok.ca/~mike/
The "`Stok' disclaimers" apply.