Click here to get back home

Lower case module name for non-pragma module

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Lower case module name for non-pragma module Patrick LeBoutillier 01-04-2005
Posted by Patrick LeBoutillier on January 4, 2005, 10:19 am
Please log in for more thread options
Hi all,

I'm writing a module that implements timeouts easily using the
following "construct":

use timeout ;

timeout 5 => affects {
# do something that runs for a long time...
} ;
if ($@){
# timeout occured...
}


I has "hinted" by h2xs to not use 'timeout' but 'Timeout' instead.

Is there some sort of unwritten rule that says that lower-case modules
names are reserved for pragma/compiler type stuff or is it just a
coincidence?

BTW: If anyone has comments/suggestions for a better construct for
this module please do not hesitate.

Thanks,

Patrick LeBoutillier


Posted by Sherm Pendley on January 4, 2005, 2:22 pm
Please log in for more thread options
Patrick LeBoutillier wrote:

> Is there some sort of unwritten rule that says that lower-case modules
> names are reserved for pragma/compiler type stuff

There is a rule, but it's not unwritten - you can find it in "perlmodlib":

Package/Module names are an exception to this rule. 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).

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


Posted by patrick.leboutillier@gmail.com on January 4, 2005, 12:41 pm
Please log in for more thread options
Thanks guys.

I will therefore proceed with Time::Out.

Patrick



Posted by Sherm Pendley on January 4, 2005, 4:15 pm
Please log in for more thread options
patrick.leboutillier@gmail.com wrote:

> I will therefore proceed with Time::Out.

That sounds like a module for sending unruly child processes to go sit
in a corner for a while. :-)

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


Posted by Jim Keenan on January 5, 2005, 11:32 am
Please log in for more thread options
Sherm Pendley wrote:
> patrick.leboutillier@gmail.com wrote:
>
> > I will therefore proceed with Time::Out.
>
> That sounds like a module for sending unruly child processes to go
> sit in a corner for a while. :-)
>

It's the modern replacement for Child::Spank, now deprecated. :-)

jimk



Similar ThreadsPosted
RFC: New module 'Module::Bundled::Files' August 26, 2005, 3:49 pm
help with an MD5.pm module!! September 3, 2005, 11:39 pm
Looking for RTP module December 9, 2004, 9:17 pm
module for FFT May 9, 2005, 3:06 pm
Module may not be right one? April 27, 2006, 12:57 pm
The 'if' module June 1, 2006, 8:18 pm
The 'if' module June 1, 2006, 8:26 pm
use module March 3, 2007, 5:13 am
Name my Module! July 27, 2007, 6:46 pm
Yet another TL1 module August 7, 2007, 4:12 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap