Move block implementation outside, in a optional module (qr_codes_block.module) to keep the main module as very lightweight "only API" module.

CommentFileSizeAuthor
#5 qr_codes_block_extracted.patch6.39 KBIncrediblyKenzi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

levelos’s picture

Status: Active » Postponed

IMHO, I think it would be a stretch to create a separate module that only implements a block, and removing the block completely increases the usage barrier for non developers. Postponing until all decide what else should go into any sub-modules.

IncrediblyKenzi’s picture

I *think* what's intended here is to module_load_include the block contents from within hook_block, so that the whole module isn't loaded when the block isn't needed. Does that make sense?

levelos’s picture

Status: Postponed » Active

Seems like a good compromise. Resetting to active.

claudiu.cristea’s picture

+1 if this solves avoiding loading of block code on a simple usage of the module.

IncrediblyKenzi’s picture

Here's a patch. Ready for review.

IncrediblyKenzi’s picture

Status: Active » Needs review

setting to "needs review"

levelos’s picture

Status: Needs review » Reviewed & tested by the community

Works well and looks good. Happy to wait a bit for claudiu.cristea to chime in or commit when ready.

claudiu.cristea’s picture

+1 for RTBC

IncrediblyKenzi’s picture

Status: Reviewed & tested by the community » Fixed

Committed to dev branch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.