Stevan Little wrote:

This is addressed in S11, here is a link:

To summarize, the syntax to load the modules is:

  use Dog-1.2.1;

While the syntax to create a specific version of a module is:

  my Dog-1.3.4-cpan:JRANDOM $spot .= new("woof");

I'd really like to see a more extensible syntax for this. So:

   use Dog 1.2.1;       # ala Perl5

And then to extend:

   use Dog { version => 1.2.1, cpanid => 'JRANDOM' };

This would allow arbitrary specifications, ie:

   use Dog { interface => 0.2,
             version => ['>=', 1.2.1],
             company => 'Sun Microsystems'

I addresses the class creation syntax partially in the initial version of the Metamodel prototype, which was built in p5. I basically just aliased the package with the long name (%{"Dog-1.3.4- cpan:JRANDOM::"} = %{"Dog::"}). However this does no good for loading of modules.

Building off the above:


Or some such, with the longest-matching object winning.


Reply via email to