On Thu, Dec 08, 2005 at 11:16:52PM -0500, Rob Kinyon wrote:
: On 12/8/05, Larry Wall <[EMAIL PROTECTED]> wrote:
: > [snip]  Certainly, as you speculate, if different authors want
: > to share an API, they can give it an "API" author that knows how to
: > delegate to one of the authors.
: 
: Would you mind elaborating on this some more?

I don't really have much elaboration to give.  We have policy modules
that can invoke other modules on behalf of the user, and you can view
an API module as a kind of policy module.

We also already know that we need to figure out how to pick between

    Funny-1.2-STAN
    Funny-1.2-OLLIE

using something like a policy.  Certainly one way to handle that would
be to allow whomever is making the decision to create a

    Funny-1.2-API

that picks between ABBOT and COSTELLO, as a kind of editorial decision.

There are two elaborations on this theme.  One is that

    use Funny-1.2

could be considered a request to search for

    use Funny-1.2-API

or more likely

    use Funny-(1.2.0...)-API

or even

    use Funny-(1.2.0...)-(/^.* _API$/)

The second is that "API" if API here is representing some kind of
editorial selection, there are potentially multiple editorial entities,
and they would presumably have different names.

    use Funny-(1.2.0...)-USER_API
    use Funny-(1.2.0...)-SITE_API
    use Funny-(1.2.0...)-CPAN_API
    use Funny-(1.2.0...)-RH_API
    use Funny-(1.2.0...)-MS_API
    use Funny-(1.2.0...)-G_API
    use Funny-(1.2.0...)-K_API
    use Funny-(1.2.0...)-MOD_API
    use Funny-(1.2.0...)-ECMA_API

and then

    use Funny-(1.2.0...)-API

might actually be end up looking for

    use Funny-(1.2.0...)-(/^ $THEME _API $/)

and then we get to fight over who sets $THEME.

On the other hand, it can reasonably be argued that a "true" API should
be completely agnostic as to its implementation.  On the gripping hand,
with roles we are specifically giving our interfaces the right to
specify default implementation, and this is construed as a feature.
So maybe it's okay for an API to specify its default.  In fact, arguably
it should be *required* to specify its default so there's clarity about
who has to add more authorial information and who doesn't.

But this is all probably something the CPAN folks would do a better
job designing, not me.  I just wanted to point out the underlying
principle that version numbers are like array indices and authors are
like hash keys, and that sometimes you want to have ordered versioning,
and sometimes you don't.  But then we have to give users a way to sort
the hash keys.

Hmm, I guess I had more to say about that than I thought I did.

Larry

Reply via email to