Jean-François Roche wrote:
Design question, is it considered bad practice to include a meta.zcml from a configure.zcml file ?


e.g Package A depends on package B

My package A requires some meta defined in package B before loading configure of package B so I do in configure.zcml of package A:

<configure xmlns="http://namespaces.zope.org/zope";
           ...
        >

   <include·package="B"·file="meta.zcml"·/>

   <include package="B" />

</configure>

Bad ? Ok ?

No, it's ok. If B's meta.zcml were already included earlier on (which may have been necessary), then ZCML will simply ignore it the second time.

Normally, we include all metas first, then the configures. But if you want to make a package work in isolation (e.g. when the package itself describes an application), it makes sense to load meta as well.

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to