# from Johan Vromans
# on Thursday 17 May 2007 12:28 pm:
>> [a-z]:: is reserved? I get that 'bin.pm' would be intrusive, but
>> ::?
>
>I do not understand this. Please explain.
from perlmodlib:
"Perl informally reserves lowercase module names for 'pragma' modules
like integer and strict. Other modules normally begin with a capital
letter and use mixed case with no underscores (need to be short and
portable)."
1. that's an informal reservation.
2. It doesn't say anything about ::, but I can't think of any pragmas
with a :: in them.
3. what would a 'bin' pragma do?
(pragmas typically use whole words, so let's pretend there is a
pragma which allows for embedded binary or something of that sort
-- it would be named 'binary')
IMO, 1 and 2 don't really matter anyway because 3.
Also, from perlnewmod:
"Perl modules included on CPAN have a naming hierarchy you should try
to fit in with. See perlmodlib for more details on how this works, and
browse around CPAN and the modules list to get a feel of it. At the
very least, remember this: modules should be title capitalised,
(This::Thing) fit in with a category, and explain their purpose
succinctly"
But we're not talking about modules so much as utilities. As you said,
$name_under_discussion is not really a namespace -- more like:
somewhere to put things. Note, I'm reading "have a naming hierarchy",
"fit in with a category", and "succinctly" as more significant than
"title capitalised" in this case because program names are never
capitalized. (Excepting of course the "C:\proGra~1\" directory, but I
think most people won't fault us for not using qdos as a role model.)
I'm saying 'bin::' because of the parallels to `perldoc bin/hello_world`
and 'require("bin/hello_world")'. The former being quite useful in a
few contexts and the latter being something enabled by not writing
scripts directly in the main package ala:
http://scratchcomputing.com/svn/misc/trunk/code/perl/bin/famwatch
To put it another way: if there were no convention or rule about
lowercaseness, would 'bin::' be a good place for small utilities? If
so, I think this is a perfect opportunity to bend the rules (there is a
reason that they aren't written in stone) to establish a useful and
logical convention.
--Eric
--
Peer's Law: The solution to the problem changes the problem.
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------