[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: changes in 'require'
- From: Javier Guerra <javier@...>
- Date: Mon, 11 Jul 2005 17:52:56 -0500
On Monday 11 July 2005 10:52 am, Doug Currie wrote:
> Surely the intent was this:
>
> 1. try to load "foo.bar"
> 2. return if successful, but if "foo.bar" doesn't exist then try
> 3. require "foo" [i.e., recurse]
> 4. try to load "foo.bar" again
> 5. fail if "foo.bar" is not loaded
>
> This recursion is limited by the length of pathnames.
i hadn't thought this way, but sounds more sane. i'd even omit step 4, then
the semantic of success is that package "foo.bar" is loaded; no matter if it
was a ..../foo/bar.lua or .../foo.lua or even .../foo.so the filename that
was eventually found and loaded.
--
Javier
Attachment:
pgpvL39IgEoya.pgp
Description: PGP signature