> I'm very intrigued by your thinking on locking.  I had never
> considered the transaction based approach to caching you are referring
> to.  I'll take this up privately with you, because we've strayed far
> off the mod_perl topic, although I find it fascinating.

One more suggestion before you take this off the list: it's nice to have
both.  There are uses for explicit locking (I remember Randal saying he
wished File::Cache had some locking support), but most people will be happy
with atomic updates, and that's usually faster.  Gunther's eXtropia stuff
supports various locking options, and you can read some of the reasoning
behind it in the docs at
http://new.extropia.com/development/webware2/webware2.html.  (See chapters
13 and 18.)

> > - why don't you use 'real' constants for $SUCCESS and the like? (use
> > constant)
>
> Two reasons, mostly historical, and not necessarily good ones.
>
> One, I benchmarked some code once that required high performance, and
> the use of constants was just slightly slower.

Ick.

> Two, I like the syntax $hash{$CONSTANT}.  If I remember correctly,
> $hash{CONSTANT} didn't work.  This may have changed in newer versions
> of Perl.

No, the use of constants as hash keys or in interpolated strings still
doesn't work.  I tried the constants module in my last project, and I found
it to be more trouble than it was worth.  It's annoying to have to write
things like $hash{&CONSTANT} or "string @{[&CONSTANT]}".

> Do you know if Storeable is definitely faster?

It is, and it's now part of the standard distribution.
http://www.astray.com/pipermail/foo/2000-August/000169.html

- Perrin

Reply via email to