user-pic

Loops

  • Commented on Managing Boilerplate with Import::Base
    Hi, great post!. For whatever reason I get a "used only once" error for both Import::Base::IMPORT_MODULES and Import::Base::IMPORT_MODULES. Can add lines to the top of My::Base like this: $Import::Base::IMPORT_BUNDLES if 0; $Import::Base::IMPORT_MODULES if 0; But fixing it in Import::Base would...
Subscribe to feed Recent Actions from Loops

  • preaction commented on Managing Boilerplate with Import::Base

    Thanks for the bug report.

    The reason nobody has seen that is probably because the IMPORT_* API is relatively new. Most of my existing uses of Import::Base override the modules() method. The static IMPORT_* stuff was added to let me do some interesting stuff in the future, and reduce the boilerplate introduced by the bundles feature (every modules() method would need to copy 5-6 lines of code in order to work right).

    I'll add a test case and push a new release.

  • preaction commented on Managing Boilerplate with Import::Base

    I added a bunch of new tests specifically for warnings, but I can't seem to reproduce your issue. Could you open a ticket on the Import::Base issue tracker and include enough information to reproduce it?

    Your note about $Import::Base::IMPORT_MODULES seems odd, because it uses @Import::Base::IMPORT_MODULES. It also uses lax references to get the right name, which shouldn't trigger the "once" warning (since that, I believe, happens at compile time).

    If you can write a test case and include your patch from your commen…

  • Jay Allen commented on Managing Boilerplate with Import::Base

    @preaction I'm seeing the same thing. If I do a syntax check on a module that uses my custom base module, the warnings are generated. The same is not true if I check syntax on the base module itself.

    I'm a bit busy at the moment with a project but I'll see what I can do to debug it, write a test case and send you a patch.

  • Jay Allen commented on Managing Boilerplate with Import::Base
Subscribe to feed Responses to Comments from Loops

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.