[Edinburgh-pm] CPAN upload
Miles Gould
miles at assyrian.org.uk
Wed Dec 21 03:55:39 PST 2011
On Wed, Dec 21, 2011 at 11:08 AM, Aaron Crane <perl at aaroncrane.co.uk> wrote:
> If you wanted to do any whitespace cleanups (convert from DOS format
> to Unix, delete line-final spaces, adjust indentation, etc), this
> would probably be a reasonable place to do them.
Good plan.
> I suggest also looking at Makefile.PL. The current version claims
> that the author is one A. U. Thor <a.u.thor at a.galaxy.far.away>, which
> seems moderately unlikely.
Good spot! Should I change that to be my name or the original
author's? He's still listed as a co-maintainer, but apparently hasn't
touched Perl for some years.
> It also fails to declare your new code's
> implicit test-time dependency on Test::More 0.88 (which is the first
> version to provide done_testing()). The simple way to do that is to
> add it to PREREQ_PM:
>
> WriteMakefile(
> …
> PREREQ_PM => {
> 'Test::More' => 0.88,
> },
> …
> );
Done.
> Yes, with one caveat. Given the existence of 0.03rc1, I'm not
> completely sure whether 0.03 would be considered older or newer than
> it. One could in theory find out, but if I were in your situation,
> I'd probably just call my next release 0.04 and be done with it —
> rather easier.
Makes sense.
> Hmm, that's annoying — I think the natural names are `size` for the
> new method, and `capacity` for the constructor option; but adopting
> that convention means that the thing to be renamed is the one that's
> been around longest. One possible approach to dealing with that is to
> document a `capacity` option, and use that name in the `insert`
> method, but support a `SIZE` option on construction so old callers
> don't break. Concretely, the constructor would look something like
> this:
Good idea.
[string-on-error]
> I'd say the options are:
>
> - remove the limitations that cause those to be error conditions,
> where reasonable
"Not added because it's a dup" feels like something that shouldn't be
an error at all, but "not added because capacity() has been exceeded
and we're already full of higher-priority stuff" feels like correct
behaviour that you might want to know about as a caller. So I think
the Right Thing is to remove the restriction on duplicates and return
0 on "insert failed because you're over capacity".
I have no idea how hard it will be to remove the restriction on duplicates :-)
Miles
More information about the Edinburgh-pm
mailing list