> > > [EMAIL PROTECTED] wrote: > > > You are in fact using the DBI module. The DB handle is > > probably (I think it > > > is) a bless reference that will send you straight to the > > DBI module that's > > > called in the function you've created. Although you're not > > using the DBI module in > > > your code, you're indirectly using it without ever knowing > > it if you made a > > > good enough class. > > > > > Generally you are correct, though there is a little "and then > > in step 3 > > black magic happens and..." to your answer. > > > > Presumably the 'use DBI' is still in the top of the personal > > module. It > > A blessed reference knows which *NAMESPACE* to find its methods in. > If you have called 'use X;' *anywhere* in your code, or in a module > or sub module, the namespace 'X' has been populated with the > methods available. >
Again this is the tricky part, the 'X' namespace hasn't been generated by the 'use'... it has been generated by the 'package X' in the file that 'use' loaded, which it is almost always acceptable to think of it as the 'use' doing it, because 'package X' will normally be the first thing in the file used, but technically not. Or do I have this wrong too? You could 'use X' and have 'package Y' at the top of X.pm and not end up with the 'X' namespace, but instead get a 'Y' namespace. The question becomes do you want to... http://danconia.org [snip] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>