Another New module on its way to CPAN

Liyang HU liyang at nerv.cx
Sat Nov 30 16:32:38 CST 2002


On Sat, Nov 30, 2002 at 07:53:40PM +0000, Stray Toaster wrote:
> On Sat, Nov 30, 2002 at 01:32:42PM +0000, Liyang HU wrote:
> >     for_loop(1, 10, sub { print shift(). " of ten!" });
> Can I beta test your next release which has something like, I dunno,
> you take a value, right, let us call it a key, and assign it a value?
> What do those new-fangled compsci people call it? Ah, yes, an
> associative array.

Finite map. :P~~

> (Liyang, it also would have been funnier if you actually had of
> reinvented the for loop and had a file at the specified url.

I've less free time than you!

> I was expecting to download it and it to just be a text file which
> called me names. Ah well, you missed that one. Boy, am I ever going to
> harang you at the Christmas dinner.)

Looking forward to it. ^_-

> > asserting copyright and specifying the license for one line of code
> > is just silly[0].
> Err, that bit is a no-brainer. I have skeleton files that create all
> the guff around my modules. What, you don't think I cut n paste (or,
> God forbid, type) all that gubbins everytime?

But the essence of all that is simply one line! I mean, it belongs more
in a tips and tricks FAQ thingy than being uploaded to CPAN... They had
problems fitting only the most recent modules on CPAN onto a CD; this
isn't going to help matters...

> > How about actually merging hashes (dealing with key clashes), like the
> > module's name suggests it ought to do?
> But if you pass it a list of hashrefs, how are you supposed to know
> which one clobbers the other?

The sub ref is user-specified. (Clobber by default, say.) This might
express my intentions better:

    my $total_count = merge_hashref(sub { my ($a, $b) = @_;
        return $a + $b }, $count_a, $count_b, ...);

> Arbitary numeric inquality type things? Nope, I left it to the user
> (namely, me).

But any other potential user (<g>) has no choice but to clobber the
things...

> As opposed to this being a freshmeat first-script syndrome, I fear
> this is more a /. bashing of me.

Nah, you're just being paranoid... isn't he, lads?

later,
/Liyang
-- 
.--{ Liyang HU }--{ http://nerv.cx/ }--{ Caius at Cam }--{ PGP: 7B632CB8 }--.
| There are two major products that came from Berkeley: LSD & UNIX.      |
| We don't believe this to be a coincidence.       -- Jeremy S. Anderson |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 218 bytes
Desc: not available
Url : http://mail.pm.org/archives/belfast-pm/attachments/20021130/42fb9eca/attachment.bin


More information about the Belfast-pm mailing list