in reply to A Perl Version of Java's import
I like the idea. I think it should be kept as minimal as possible, though - not 'Our::Code::O*' just 'Our::Code::*'.
I'm not sure about the import part. On the one hand, I want it to just be like a shortcut for a namespace, so not do an import; but on the other hand, that would be really messy to do the import at the last minute when you actually use a module from that namespace. I think you also have a problem of it not just being new that can be used, as some modules can use other names, and also there are package variables. I'm not sure how Java deals with package variables and namespaces.
And the last question about resolving DateTime versus Our::Code::DateTime, how does Java deal with that? Is it like putting the namespace at the beginning of @INC?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A Perl Version of Java's import
by Ovid (Cardinal) on Aug 07, 2007 at 10:32 UTC |