From: Robert Klemme Date: 2009-11-24T21:43:20+09:00 Subject: Re: [ANN] autoloader, version 0.0.2 2009/11/24 David Masover : > A couple of handy features to enhance Kernel#autoload. > > Changes since 0.0.1: minor tweaks to the gem, and migrated to gemcutter. > > Question: How do I add a choice of dependencies? Right now, I can use either > extlib or activesupport for inflections. > > Also: This is my first ever ruby-talk announcement. Someone please tell me if > I am Doing It Wrong. Looks fine to me. But I do wonder how you generate the symbol names for autoload files? Basically autoload needs a symbol name and a file name. While the file names can be extracted from a directory how do you find the symbol name? Maybe users should be able to customize that algorithm in order to be able to autoload class "FooBar" from file "foobar.rb" or "foo_bar.rb". I would at least add a description how you generate the symbol name from the file name. Btw, one disadvantage of using a directory glob is that it is far more expensive than the standard autoload because the standard autoload does not need any file system IO before any file is loaded. Using directory globbing on the other hand requires to at least read the directory which may slow down startup of a script considerably. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/