Xiong has asked for the wisdom of the Perl Monks concerning the following question:

I like Smart::Comments but it prints all its output to STDERR. In another project I'm already redirecting STDERR, so I want to be able to instruct my smart output to go elsewhere: usually, to a disk file.

I've forked Smart::Comments and rewritten it, both to permit printing to any filehandle and to address some stylistic issues. This project is incomplete but making good progress. Please see link to current GitHub repository. More work remains.

Originally, I intended to call this 'Smart::Comments::Log'; its working title is 'Smart::Comments::Any'. Some Monks have objected to the latter name as vague. I need to name it finally, change all places where the name appears, and move the GitHub repo before uploading to CPAN.

I began by keeping the new module fully backwards-compatible with vanilla Smart::Comments but I feel this may be too restrictive in future. The project is a major rewrite, a fork, not a patch. I've emailed current maintainer without getting a reply. The idea of releasing this as a new version of Smart::Comments is probably a dead end, even if I thought it wise.

I've aired this naming issue in CB, posted to comp.lang.perl.modules, sent an RFC to modules@perl.org, and sent a couple emails to current maintainer with CC to TheDamian. The silence is deafening.

I'm hostile toward long identifiers, especially those of mixed case. For what it's worth, I don't feel the 'Smart::' top level namespace was an ideal choice; but now, it may be unwise to put the current module anywhere except under 'Smart::Comments::'.

Current ideas include:

I will update this list to include new suggestions.

2010-07-27:

Perhaps I should note that the list above is only indicative. This node exists because I don't especially like any of them.

2010-07-28:

Devel::Comments is the winner.

Development has halted for two weeks as, here and elsewhere, comments have been solicited on the right name for it. An excessive amount of late-night CB time has been consumed. Hundreds if not thousands of dollars have been spent discussing the topic on thousands of machines throughout the entire civilized world.

Summary:

I bow to the consensus.

Note: Contents may change.

Replies are listed 'Best First'.
Re: The Module Formerly Known As ::Any
by BrowserUk (Patriarch) on Jul 25, 2010 at 04:12 UTC

    Count one vote for Devel::Comments. In particular because it means that this should work:

    perl -d:Comments script.pl

    Even better if -d:Comments=3 and -d:Comments=0 worked to enable particular levels, or disable completely.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      I do plan numerical level enabling in addition to the clever '###', '####' syntax. But so many things might be passed in to the module; I'm not sure I can give priority to level. Please see POD and tell me how you'd like the interface modified.

      Note: Contents may change.
Re: The Module Formerly Known As ::Any
by Thoughtstream (Novice) on Jul 25, 2010 at 08:44 UTC
    ...sent a couple emails to current maintainer with CC to TheDamian. The silence is deafening.

    Your two emails ended up in my spam filter. Plus I am busy coping with a death in my immediate family.

    As regards naming your forked module, I'd suggest Devel::Comments would be the best choice (though Smarter::Comments is certainly clever).

    Damian

      I'm aware of your loss; my condolences surely are inadequate.

      The CCs were courtesy only; I hoped the current maintainer might comment. Thank you for putting in your word.

      Note: Contents may change.
Re: The Module Formerly Known As ::Any
by furry_marmot (Pilgrim) on Jul 26, 2010 at 21:31 UTC

    My two cents: Realistically, Devel::Comments is probably the right hierarchy, but I like Smarter::Comments better because, well, you did set it to do it right didn't you? :-) And anyone who can't remember the name can just look up on -- Whoa! -- wait a minute -- Holy AxKit::App::TABOO::Data::Plurals::Comments, Batman! There's a lot of modules with "comments" in them!

    I just searched CPAN for "comments" to see what I'd get. Of 3895 results (!!!), Smart::Comments is the third, while File::Comments is 1st and File::Comments::Plugin::* is 4th and 7th to 14th! And what order are the results returned in anyway???

    Anyhoo...either of the above makes more sense to me than adding another level to Smart::Comments because it sounds like you're inheriting from the parent.

    --marmot