[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: modules, require, magic
- From: KR <krunal.rao78@...>
- Date: Tue, 18 Oct 2011 09:29:45 +0000 (UTC)
Luiz Henrique de Figueiredo <lhf <at> tecgraf.puc-rio.br> writes:
> This way works fine for both 5.1 and 5.2
> There is no need for a module function and no need for syntax either.
> No one needs to know about _ENV for that only for complicated things
> like avoiding writing "M." (probably not a good idea as it serves as
> documentation of what is exported).
> All my C modules follow this (but do create a global as well). Changing
> them to 5.2 is really easy, even removing the creation of the global.
> I do not see any big deal here.
I completely agree with all of the above.
I have written not-trivial (well, for me at least :P) libraries following this
mechanism and never ever had an issue with it. I agree that modules should not
pollute the global "namespace".
What is done is perfectly clear to everybody (newbies and seasoned developers
alike) and requires 1 extra single line versus the module approach. If a global
entry is wanted it's also very easy to add it as well from user side.
- modules, require, magic, Eduardo Ochs
- Re: modules, require, magic, Javier Guerra Giraldez
- Re: modules, require, magic, Petite Abeille
- Re: modules, require, magic, Sam Roberts
- Re: modules, require, magic, Hisham
- Re: modules, require, magic, Luiz Henrique de Figueiredo