473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Q: What to name a module?



I am working on a module that when given a CPAN distribution, will return
which modules the distribtion requires (by parsing the Makefile.PL using
Module::MakefilePL::Parse if the META.yml file is not available).

A companion module will actually try to fetch the distribution information
from CPAN (since it can query a .meta file if it exists before downloading an
entire distribution).

Because it is more closely tied to CPAN and works with distributions rather
than modules, I am thinking of calling it CPAN::Distribution::Depends.

Comments or suggestions about the namespace would be appreciated.

FYI--I am writing yet another module to do this because existing modules
either do not work on my platform or they require preqrequisite modules to be
installed. Basically they either compile the module or run
Makefile.PL/Build.PL and see what modules are asked for. I'd rather use a
safer (and I think faster) method to partially-parse the Makefile.PL if no
META.yml is available.

Some tests using all the latest distribution on CPAN show that it works for
all but a handful of distributions.

This is actually part of a larger project to show test results (organized by
platform) of module dependencies. If there is a failure in the dependency
tree, authors can check for this.

I've also posted this question on Perl Monks at
<http://perlmonks.org/index.pl?node_id=374747>

Jul 19 '05 #1
2 2571
Hi,

CPAN::Distribution::Depends is good, but how about
CPAN::Distribution::Resolv ?

Jul 19 '05 #2
Robert Rothenberg wrote:
Because it is more closely tied to CPAN and works with distributions
rather than modules, I am thinking of calling it
CPAN::Distribution::Depends.

Comments or suggestions about the namespace would be appreciated.


The one recommendation I remember from many, many years ago was that in
the vein of the data structure being the real core of an object system,
that you name the module after a noun, rather than a verb. So 'Depends'
would be good (as short for 'dependencies'), and 'Distribution' is
better than 'Distribute'.

Krishna Sethuraman
kr******@wapacut.com
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andreas Neudecker | last post by:
Hi. I know you can read the filename of a program as sys.argv. But what about modules? Is there a similar way to find out the file name of a module (called by some other module or program) from...
2
by: Olivier Vierlinck | last post by:
Hi, I've a python script using somecalls to the abs() built-in function. Now, I have to import a module named 'abs' too... The consequence if that line code like if (abs(a-b) < epsilon:...
1
by: Xif | last post by:
Hello Everyone! Here's a problem with relative imports: Suppose I have a package called some_package (in a separate directory included in the PYTHONPATH, with an __init__.py file etc.) This...
1
by: John Pass | last post by:
Hi, This is something really simple. A Console Application example in a course book, where the module file name was renamed to Welcome1, works fine when I use the original name "module1" for the...
13
by: bobueland | last post by:
I'm a newbie experimenting with Python. I want to incrementally develop a module called 'circle'. The problem is now that the file name is used for two purposes. To keep track of the version number...
1
by: alain MONTMORY | last post by:
Hello everybody, I am a newbie to python so I hope I am at the right place to expose my problem..... :-http://www.python.org/doc/2.4.2/ext/pure-embedding.html 5.3 Pure Embedding I download the...
2
by: Tyno Gendo | last post by:
I'm writing a test "modular site". So far I have created an App class, a Module Manager class and a couple of test modules. The Manager looks in a directory called 'modules' and then for every...
0
by: Pradnyesh Sawant | last post by:
Hello, I have a string which in reality is the name of a module to be imported. The name of the class contained in the module also has the same (although with different capitalization). My...
3
by: kwatch | last post by:
What is the condition of module name which is available in 'from .. import ..' statement ? ---------------------------------------- import os print os.path # <module 'posixpath'...
13
by: Neil | last post by:
Can I get the name of a procedure from within the procedure? In my error handler, I write the error to an error table. I'd like to write the name of the procedure that's writing the error. But,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.