From: Hugh Sasse Staff Elec Eng Date: 2000-08-10T10:53:19+01:00 Subject: [ruby-talk:04396] Re: New Require (was: RAA development ideas (was: RE: Looking for inp ut on a 'links' page)) On 9 Aug 2000, Dave Thomas wrote: > OK - maybe now's the time to mention an idea I've been mulling over. [...new require operation...] > So... we can then find out all the meta-data about a module as we load > it in. We could do things like: > > module Kernel > def requireVersion(name, version) [...including call res.versionCompatible(vesion)...] > end > end > > > So in normal user code, you'd write: > > requireVersion 'wombat', '1.3.4' > > Which would either work transparently or output a message such as > > Package wombat, requested 1.3.4, got 1.2.3 > Latest version available from ftp://ftp.pragprog.com/pub/.... > This seems useful to me. The only thing I see missing from this is We want version 1.3.4 or newer, but we know that we don't want 1.3.8, because that only lasted 6 hours until the bug (that slipped throgh the regression tests) breaking earlier working code was found. But we don't want to force users of 1.3.{4,5,6,7} to upgrade. So this may depend on where versionCompatible() is implemented (If the requiring module redefines it then there is more flexibility, but it is harder to use). > > > Matz: > > If you think this has merit, and we can all refine the details here on > the list, I'd be happy to do the actual work in 1.7. > > > > Dave > Hugh hgs@dmu.ac.uk