There already is a corollary to TMTOWTDI in this sense; it's the First Virtue of Programming.
Laziness means expending a little energy at the outset to save a lot of work later on. I think the camel book does a good job discussing how laziness can be useful, I think it even discusses CPAN in that section. But "get thee to CPAN" isn't going to help in this case.
Here's a challenge: using CPAN, try to find an indication that posix.pm is the right module to solve the problem leons did with his subroutine, without specifying strftime in the search box. I couldn't do it. The closest I came on CPAN was a reference to Date::Calc, on a search for 'date' and 'sprintf'.
If I cheated and used a google search restricted to perldoc.com, the same query gives me Date::Calc as the first choice, and a Tk:: module that mentions strftime as the second choice (if I'm willing to dig for it).
I suspect it is often less work to reinvent the wheel.
To reframe the question: how can we make CPAN more helpful to lazy people?
Here's one possible solution: CPAN should contain a copy of all module documentation in a format that google will index-- all the pod files for every module. Right now I think a lot of the documentation is locked up in .gz files.
Perhaps then, when I do a web search for "perl date sprintf" CPAN will show up in the first 40 results.
I suspect that would go a long way toward making people aware of CPAN.
___
-DA
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.