Eric Wilhelm wrote:
> I know it sounds like a hack, but perhaps the complete solution *is* to 
> use perl "modules" for identifying all applications.  Can we just have 
> an 'external::' namespace or something?
> 
>   configure_requires:
>     'external::perl': 5.8.8
>   requires:
>     'external::svn': 1.4.2
>
> This would be similar to 'Alien::*', but the purpose is (initially) to 
> just provide a $name->VERSION API.  It could, of course, be extended to 
> provide other useful information and/or run a system-specific installer 
> (e.g. aptitude) to automatically satisfy the dependency.
> 
> I think we would maybe benefit from making the 'external::' namespace 
> special.  That is, the consumer could choose not to load the identifier 
> as a module, but instead to query a database or etc.  No, I can't stop 
> anyone from uploading random code into that namespace (and perhaps we 
> need the .pm's for compatibility anyway), but we can specify that the 
> consumer has the option to handle the query itself in that namespace.

Yes, I've thought about this approach, too.  It might be the best way to go.

Syntax-wise, I'd rather see something like this:

        requires:
                external:
                        svn: 1.4.2
                        mysql: 5.0
                        python: 2.1

That way there is no ambiguity about whether a given requires key is a module
name or something special.  Module names have simple values, special keys have
complex values.  Then there is no name clash.

Also for the same reason that you'd write:

        %external = (
                svn     => 1.4.2,
                mysql   => 5.0,
                python  => 2.1
        );

than

        $external::svn          = 1.4.2;
        $external::mysql        = 5.0;
        $external::python       = 2.1;


-- 
Ahh email, my old friend.  Do you know that revenge is a dish that is best
served cold?  And it is very cold on the Internet!

Reply via email to