Re: [code-review] Tie::Array::Sorted
Andy Lester <andy-U7RegYgSe6NWk0Htik3J/[email protected]> Wed, 12 Nov 2003 11:15:57 -0600
| Newsgroups | gmane.comp.lang.perl.code-review-ladder |
|---|---|
| Message-ID | <[email protected]> |
> > No test suite?
>
> Um, not embedded in the .pm file, no.
Clearly, no. Still, I think of the tests as much a part of the code as
the code.
Just from a module-users point of view, I'm surprised to see the default
be a numerical sort rather than a string sort. Perhaps as a convenience,
provide and export that one-line function in the package to do string
sorts, so that users can
tie @a, "Tie::Array::Sorted", stringily;
(BTW, the code line in the DESCRIPTION has a lowercase t in the module
name in quotes)
I'm glad to see the stringification getting exercised in the test file.
I'd add shift/unshift, clearing, deleting, resizing, retying, etc for
completeness.
Tie::Array::Sorted is just fine as a name.
Finally, if you want to test your POD (and who wouldn't?), here's a
t/pod.t:
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
all_pod_files_ok();
But these are minor. Very nice.
xoa
--
Andy Lester => andy-U7RegYgSe6NWk0Htik3J/[email protected] => www.petdance.com => AIM:petdance