Hello Aristotle,
A. Pagaltzis wrote:
Hi Sébastien,
* Sébastien Aperghis-Tramoni <[EMAIL PROTECTED]> [2007-10-06 03:05]:
package BigApp::Report;
use relative to_parent => qw(Utils);
# loads BigApp::Utils
use relative to_self => qw(Create Publish);
# loads BigApp::Report::Create, BigApp::Report::Publish
I like the idea. Catalyst privately invents something like that,
so obviously there are other people who feel the same need.
Yes, POE also provide a similar mechanism, that's why I was thinking
to provide a generic module to do that.
But I like neither the name nor the interface. How about this:
package BigApp::Report;
use subclass qw(..::Utils Create Publish);
# loads BigApp::Utils, BigApp::Report::Create,
BigApp::Report::Publish
"subclass" would imply more OO semantic than I'd like, as the module
just loads others modules, but I agree it's a better name than
"relative" and I can't find a better one.
Also agreeing for the API change. I know I was pondering about using
".." but can't remember why I didn't.
Thanks
--
Sébastien Aperghis-Tramoni
Close the world, txEn eht nepO.