[dancer-users] Is it necessary to "use Plugin" in every module where I want to use the plugin's new keywords?

Alexis Sukrieh sukria at sukria.net
Mon Mar 4 09:04:42 GMT 2013


2013/3/4 Punter <punter at punter.gr>:
> Couldn't we make it so, that if you include the plugin in config.yml, then
> you get its keywords everywhere where we just "use Dancer"?
> Please?

I don't like that, because you end up with altering the context of a
Perl package via a config file.

I'm really not a big fan of that. To me, whatever pollutes the
namespace should come from the code, this way there is no hidden magic
behind the scene, preventing horrible bugs like "where the f** is
coming this goo_bar keyword in my namesapce? I don't even load
anything in that package!".

> Code would then be a lot cleaner and shorter.

As explained, I don't think "cleaner" apply for the resulting code.
More implicit, yes, but is that cleaner?


More information about the dancer-users mailing list