From: drieux <[EMAIL PROTECTED]> > Unless someone can come up with a really HOT idea as to why one > would want to put a 'package declaration' in an application - and I > have tried, but for the life of me, can not come up with a good reason > to go there... the simple rule of thumb would seem to be: > > if the package assertion makes sense here > then this should be a Module > hence start with h2xs
Well ... imagine you need some custom class of objects in your application or need to extend some class. Something small and specific so it doesn't deserve it's own file, but the functions and variables do have to belong to another package. Also if you look into some modules you'll find out that they often have several package statements. Eg. Interpolation.pm (0.66+) has packages Interpolation, Interpolation::S2A, Interpolation::A2A, Interpolation::A2S, Interpolation::general and Interpolation::internal. Most of them span only about 10 lines. It would be silly to create separate files for them. Or if you look into a recent Mail::Sender you'll see that there is not only package Mail::Sender, but also Mail::Sender::DBIO and Mail::Sender::IO. The Mail::Sender::DBIO implements a file handle that writes to and reads from a socket and logs everything into a file, the Mail::Sender::IO implements a filehandle that encodes the data as necessary for current part of email and sends them to the socket. The filehandle you get from $sender->GetHandle(). Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]