On Tue, Jun 02, 2009 at 10:58:21AM +0200, Daniel Carrera wrote: > John M. Dlugosz wrote: >> The front-end should figure out which binary is proper for your >> platform. > > I don't like that idea in the slightest. (1) It is not Perl's job to > know if you have a C compiler, C libraries and tool chain. (2) If my > computer can handle Perl, C and Parrot, I want the choice of what to > install. (3) That includes the possibility of installing more than one > module. It is perfectly legitimate to install three implementations of > SHA (one in C, one in Parrot and one in pure Perl). This last one means > that there has to be a way to tell Perl which of the Digest::SHA modules > I want to use for this particular program. > > Suppose I want to install three versions of SHA. One in C, one in Perl, > one in Parrot. I need a way to specify in the "use" statement which one > I want.
For the Parrot case at least, I suspect one would/could do: use SHA:from<Parrot>; (See the :from adverb in S11.) Indeed, for someone who is running an implementation of Perl 6 on Parrot (and where a Parrot-specific implementation of SHA is available), I would expect a plain "usa SHA;" to load SHA.pm which then in turn does the :from<Parrot> version of use. Or any other number of implementation-specific tricks that can hide the details for a generic "use SHA" but still make it possible for more specific requirements to be made. Pm