On Mon, Dec 10, 2007 at 12:17:16PM +0100, Dominique Quatravaux wrote:
> Tim Bunce wrote:
>> I was thinking in terms of a low-level 'thin' extension called
>> Lib::libmemcached with separate pure-perl modules implementing the Cache
>> and Cache::Cache interfaces.
>
> Surely you found out about Cache::Memcached and friends? Basically what 
> you're proposing is a refactoring of these. Are the current maintainers of 
> same aware of your efforts? If so, perhaps they could hand over some 
> namespace slots to you.

It's not as simple as it may seem at first.
Cache::Memcached is pure-perl. That's an advantage for some people.
Cache::Memcached::XS is compiled but links to the libmemcache library
(not the libmemcache*d* library that I'll be using).

There is a need for a perl wrapper for the libmemcached library,
but that doesn't invalidate the needs of others for other APIs.

>> So, here's the point: does anyone have any good objections to my
>> establishing a new precident by using the Lib:: namespace for this?
>
> +1, imho it makes good sense to have (some future version of) 
> Cache::Memcached depend on Lib::Memcached.

I'd rather say it makes good sense for the libmemcached library to be
usable via multiple APIs, including an API compatible with
Cache::Memcached, an API compatible with Cache, and an API compatible
with Cache::Cache. Hence the two-level approach.

Re the choice of name for the low level library...

    Lib::Memcached
    Lib::memcached
    Lib::libmemcached

My preference is for Lib::libmemcached because it emphasises the name
of the library that it's a wrapper for. (Think of "libmemcached" as a
brand name. It's certainly distinct from "memcached" and even distinct
from "libmemcache".) I want people searching for libmemcached to also
easily find Lib::libmemcached.

My goal for this kind of thin wrapper is to be so thin that the
documentation just defines a set of principles (type conversions etc)
and then refers to the user to the documentation for the function in
the underlying library. That's made easier in this case by libmemcached
having a fairly well abstracted API.

Tim.

Reply via email to