|
From: | Paul Kienzle |
Subject: | Re: package manager patch + problem |
Date: | Wed, 28 Feb 2007 08:20:15 -0500 |
On Feb 28, 2007, at 5:40 AM, David Bateman wrote:
Michael Goffioul wrote:Looking at autoload(), it doesn't seem to load the file. I suspect the which() command does, but it is not immediately clear from glancing at the code. Maybe we could use the following instead: autoload("glog",file_in_loadpath("gf.oct"))Yes, I also think it's due to "which": if you "which myfun" where myfun is an oct-file named myfun.oct, but you don't have a corresponding "DEFUN_DLD (myfun, ...)" statement in the code, then "which" fails: this means that somehow, the oct-file must be loaded and the symbol is searched. Michael.Is it better to workaround this with the autoload commans in the PKG_ADD files or try and figure out why which is loading the DLD functions and try and stop it doing it..
As it is currently defined, which() is operating on symbol table items, so I don't think you are going to avoid loading the symbol at the same time. My concern with file_in_loadpath() is that it might return relative rather than absolute file filenames (I don't know) but other than that I think it makes it more clear what the autoload is doing. - Paul
[Prev in Thread] | Current Thread | [Next in Thread] |