I released my first module, Class::Trait to CPAN a week or so ago. But to be honest, I had always thought of it as a more pragma-ish module though, and had in the early stages called it trait rather than Class:Trait. Eventually though Class::Trait stuck, and it was released as that. But now as I am tweaking the code more, and experimenting with using the module, I am thinking it is more appropriate as a pragma, and maybe I should rename it as such.
Class::Trait does 90% of its work in the BEGIN phase, the other 10% in the INIT phase and provides no functions for any outside modules to call. It also does a whole lot of symbol table analysis & manipulation. To me that is a pragma. But I think Class::Trait is more appropraite as a pragma not just because of when and how it does it's work but also because I think the syntax would be cleaner. Consider the current state:
Versus the pragmatic name:use Class::Trait "TPrintable";
I know it is not a huge difference, but to me it just reads better and feels cleaner.use trait "TPrintable";
I am wondering how people feel about pragma-style module names compared to more "regular" module names. It seems that the pragmas section on the CPAN is one of the more sparsly populated areas, although I know this is only the registered ones. Am I just not seeing the bredth of pragmas out there, or are there really just not that many? When proposing a module name/namespace through the PAUSE web interface, pragmas are not even listed as a category, but as an interface style. Is there a reluctance out there to use/accept pragmas over "regular" modules? What do you all think?
-stvnIn reply to RFC : Pragma vs. Module by stvn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |