in reply to Re^2: "use"ing from dynamic namespace
in thread "use"ing from dynamic namespace
Would there be anything wrong with doing config_module in the base class as: ...
...the only problem is it wouldn't work ;) — at least not with perrin's code snippet. One thing is that if you use require with a string (as opposed to a bareword), it must be a valid path fragment (i.e. / in place of ::), inlcuding the trailing .pm. The other thing is that when you declare config_module() in the base class, __PACKAGE__ would always be Base::Module, but the point of the exercise was to load different config variants (associated with Foo, Bar, etc.).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: "use"ing from dynamic namespace
by pobocks (Chaplain) on Dec 02, 2008 at 23:37 UTC | |
by almut (Canon) on Dec 03, 2008 at 01:15 UTC |