Andy Armstrong wrote:

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.

Would it also do

use relative [to => 'My::Big::Namespace'] => qw( This That Munger::Fast Munger::Precise );

It can easily do that. The problem is more the name. In this case, "use relative to ..." works well. But in y original example, "use subclass" works better. Maybe I should provide both modules then.

--
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.


Reply via email to