Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Perl 6 Module manager

by sfink (Deacon)
on Apr 19, 2006 at 15:59 UTC ( [id://544399]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl 6 Module manager
in thread Perl 6 Module manager

I think the OP means "portable" in the sense "portable between otherwise equivalent machines with different sets of modules installed." That's a significant win; at a workplace, there will be dozens of desktop machines, and if you're writing scripts for other people to run, you have to be sure to only use modules that are available everywhere (or preinstall the ones you need everywhere.) But the base OS is still the same. I'm not going to worry about whether that fits a purist definition of "portable".

I wouldn't use the suggested mechanism because of the security concerns. But I might if the security concern wasn't there -- and as I read this thread, it struck me that it's fairly easy to remove: when requesting a module, request it using an exact version and a cryptographic digest. I'd probably want the digests to be listed in a separate file, both to avoid messing up the main script and to allow for dependencies. For any missing module, you'd download the requested version and check its digest before installing it. I know that CPAN can already check signatures, but that still relies on an external source for the signatures to check against. And I also like the notion that you could depend on getting the exact versions of things that you originally wrote your script against, so you don't need to worry about some module changing its interface out from under you.

It doesn't deal with the problem where a different version is already installed on the system, but it doesn't make that problem any worse either. It would just use whatever's there if some version existed, and you have no more than the usual version compatibility problems. It could even warn in such cases, which is better than what we get now.

Or think of it this way: you could bundle up a script with the complete source for all modules it uses, and it unpacks and installs them all when it first runs if they aren't already on the system. The proposed idea does exactly that, except it uses unfakable pointers to each module rather than the actual data comprising the module.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://544399]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-03-28 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found