Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

What's the general rule for naming modules with that extra 'x' in the namespace?

by rudder (Scribe)
on Mar 25, 2008 at 18:35 UTC ( #676193=perlquestion: print w/ replies, xml ) Need Help??
rudder has asked for the wisdom of the Perl Monks concerning the following question:

When is it appropriate to name your module with an extra 'x' or 'X' in the namespace, as in "FooX::Bar", "Foo::BarX", or "ABCx::Foo"?

Comment on What's the general rule for naming modules with that extra 'x' in the namespace?
Re: What's the general rule for naming modules with that extra 'x' in the namespace?
by kyle (Abbot) on Mar 25, 2008 at 18:50 UTC

    I believe these are extensions. For example, DBI says extensions should go in DBIx. Moose says the same about MooseX.

Re: What's the general rule for naming modules with that extra 'x' in the namespace?
by moritz (Cardinal) on Mar 25, 2008 at 19:48 UTC
    The 'X' stands for "eXtension", so FooX::Bar is an extension to Foo named Bar. Example: DBIx::Class extends DBI to have class functionality.

    So just add an X to the thing you want to extend.

      Thanks kyle and moritz, but, a class "Foo::Bar::Baz" might inherit from (er... extend) a class "Foo::Bar".

      So, it looks like if you're dealing with the object oriented, inheritance kind of "extend", you just name your module as shown in the previous paragraph. But if the extending isn't the OO kind, I guess that's where you start using the 'x'.

        No, this is not the reason. It does not have anything to do with object orientation or whatnot mechanism.

        We have DBIx and MooseX because timb and stvn own the namespaces without x, and extension module authors are careful not to trample in them.

        See the module-authors list for further detail.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://676193]
Approved by pc88mxer
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-12-22 01:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (110 votes), past polls