If you're worried that a standard data structures library will somehow deeply pervert Perl into Java by mandating the use of specific modules, I think you're missing a lot more than just the point of the "SPL" concept.
The reason people get berated about writing their own CGI routines is because they do them badly. Not just slightly bad, not just in ways that are minor and forgivable, but in ways that illustrate what a gigantic hairball this whole CGI thing really is. There are bits of code in
CGI.pm that are so stunningly stupid that you would be inclined to remove them, but they are there for a reason, probably to work around some limitation or peculiar "feature" of some Web server or browser somewhere. It is, as best as I can tell, the collected knowledge and wisdom on the subject of CGI in Perl, presented in module format.
Standard data structures are not hairy in this way. Anyone can make a linked list and it will work just fine. You know it is going to work properly because you know exactly what it has to do, and you can test it. To compare, people still aren't sure what CGI
is in specific terms.
What
educated_foo was probably suggesting was that although many of these are trivial to implement, why should we all have to roll our own each time we need them? When you roll your own, there is always the risk that you will do it wrong, sometimes because of something simple like an off-by-one error, or a mistakenly reversed logical operator. Nobody is perfect, and I would argue that anyone's relative perfection diminishes as the night grows longer.
It would really be great if these sort of structures were built into the standard distribution so that they
could be used. That way nobody is forcing you to use them, but at least you aren't forced to write your own.
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.