|
From: <ja...@op...> - 2001-02-23 15:46:49
|
"Michael Pear" <mic...@ho...> writes: > Solved my problem. UserSec was apparently loaded > through "check_password" and available for use, but none > of the other table classes (like Contact) were. So everything > worked with UserSec, but nothing else. Fixed by adding > a "require Bio::Genex::Contact;" before using this. Hi Michael, First, I'm back from Mexico. Fire away any more questions. Second, it's really cool that you're now stress-testing the API, I'll have to practice my duck-and-cover techniques again ;-) The issue of which modules to include (with a 'use' or 'require' pragma), should be fixed in the documentation (someplace??). The issue is that loading modules into memory takes time. Since there is a module for every table in the DB (which is a lot of modules) most applications will only need to access at most a few, so it would be a major unecessary slowdown to include them all by default. The guideline in Perl is that whenever you are going to access anything out of a class, either a variable or a class method, you have to 'use' that class. Calling ->new() is one such case, another is ->get_all_objects() and ->get_objects(). I am open to suggestions as to how to improve this. jas. |