Re: [code-review] Tie::Array::Sorted
Simon Cozens <simon-eH/[email protected]> Wed, 12 Nov 2003 16:30:10 +0000
| Newsgroups | gmane.comp.lang.perl.code-review-ladder |
|---|---|
| Message-ID | <[email protected]> |
Andy Lester: > Just from a module-users point of view, I'm surprised to see the default > be a numerical sort rather than a string sort. Having a sorting module that, by default, sorted things differently from Perl's built-in sort for no good reason would be... suboptimal. > provide and export that one-line function in the package to do string > sorts, so that users can > > tie @a, "Tie::Array::Sorted", stringily; Neat. I was toying with the idea of testing for a third parameter of "cmp" and "<=>" and turning them into the right sub. > (BTW, the code line in the DESCRIPTION has a lowercase t in the module > name in quotes) Blast. > I'm glad to see the stringification getting exercised in the test file. Yeah, that test turned up some weirdnesses. > I'd add shift/unshift, clearing, deleting, resizing, retying, etc for > completeness. You're more completist than I. ;) > Finally, if you want to test your POD (and who wouldn't?), here's a > t/pod.t: Good thought. I hadn't seen Test::Pod before. Thanks very much for the review. -- "The elder gods went to Suggoth and all I got was this lousy T-shirt."