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?
-stvn
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RFC : Pragma vs. Module
by liz (Monsignor) on Mar 14, 2004 at 17:02 UTC | |
by stvn (Monsignor) on Mar 14, 2004 at 21:38 UTC | |
by liz (Monsignor) on Mar 14, 2004 at 22:37 UTC | |
by stvn (Monsignor) on Mar 15, 2004 at 01:55 UTC | |
by Aristotle (Chancellor) on Mar 15, 2004 at 09:21 UTC | |
| |
by stvn (Monsignor) on Mar 14, 2004 at 23:16 UTC | |
by ysth (Canon) on Mar 14, 2004 at 23:30 UTC | |
| |
|
Re: RFC : Pragma vs. Module
by perrin (Chancellor) on Mar 14, 2004 at 16:56 UTC | |
by Abigail-II (Bishop) on Mar 14, 2004 at 17:25 UTC | |
by etcshadow (Priest) on Mar 14, 2004 at 21:36 UTC | |
by liz (Monsignor) on Mar 14, 2004 at 22:43 UTC | |
by perrin (Chancellor) on Mar 15, 2004 at 05:38 UTC | |
by perrin (Chancellor) on Mar 15, 2004 at 05:33 UTC | |
by ysth (Canon) on Mar 14, 2004 at 17:40 UTC | |
by perrin (Chancellor) on Mar 14, 2004 at 18:53 UTC | |
by stvn (Monsignor) on Mar 15, 2004 at 02:17 UTC |