Ever Wonder Why Not Everyone Uses Modules? 
Author Message
 Ever Wonder Why Not Everyone Uses Modules?

Quote:

> I'm trying to use Net::SMTP, as most of the gurus on this group recommend
> it over piping commands to sendmail directly.
> Since I don't have root access, I'm trying to install a local copy in the
> directory where I'm writing my perl scripts.
> My first try failed because it didn't install a module called
> "Net::Config". There doesn't appear to be any mention of it in the
> by-modules/Net directory of CPAN, so maybe it's generated by the install
> process, but it's not being installed in my case.
> I delete everything and try to intstall again. I notice an error message
> telling me that I need "Data::Dumper" to be installed. So I ftp back to
> CPAN and download Data::Dumper.
> As I try to install Data::Dumper, I get this message:
> gcc: installation problem, cannot exec `cpp': No such file or directory
> *** Error code 1
> make: Fatal error: Command failed for target `Dumper.o'
> I've now been working on this for an hour and I still can't run a two-line
> test script. If I were actually working on something that needed to be
> finished any time soon, I would have abandoned this approach about a half
> an hour ago and just written the code to communicate with sendmail.
> Is it any wonder why a lot of perl developers don't use pre-written
> modules? Modules are *supposed* to make it easier to accomplish certain
> tasks without getting bogged down in the minutiae of your operating system
> but in this case, it's exactly the opposite. Whereas I could have written
> the "raw" perl code to accomplish the task at hand in about five minutes,
> I've now spent an hour fruitlessly trying to install a module that's
> supposed to make my life easier.
> End of rant.

I think all of us who develop Perl modules should take this critique
seriously.

I learn from this that any module should CLEARLY name at some PROMINENT
place ALL dependencies, such as other modules that are required, or
wether a compiler will be needed or not (and which Perl version is
required, if it makes any difference).

Obviously the mere mention "Prerequisites - what else you may need to have."
in section "2.7 README and other Additional Files." of chapter "2) Guidelines
for Module Creation" in "The Perl 5 Module List"
( http://www.*-*-*.com/ )
is not enough.

Maybe the maintainers of the Perl 5 Module List should change this to a
more explicit incitation to name all dependencies, especially other modules
that will be needed?

I personally think that modules from the CORE of the Perl distribution
do not need to be explicitly mentioned, though.

Anybody any comments or additional ideas?

Best regards,
--

    Free Perl and C Software for Download: www.engelschall.com/u/sb/download/



Sun, 22 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?

Quote:

> Maybe the maintainers of the Perl 5 Module List should change this
> to a more explicit incitation to name all dependencies, especially
> other modules that will be needed?

I agree. But let's not forget required tools for building. The
original poster (if I remember correctly) had a problem with gcc (or
was it cpp) not being found. That's a show stopper. I'm thinking that
maybe a script (rather than just a file) might be needed so it can do
things like

use Config;
print <<EOF

To build this module you will need the following tools. These tools
were used in building the installation of Perl that resides on this
system, and using the same tools is the best chance for sucess:

$Config{make}
$Config{cc}
$Config{cpp}
...
$Config{yadda yadda yadda}
etc.

EOF

... as well as identifying module/distribution dependencies. Or
instead of printing this stuff, the script could go out and try to
find the tools (and module depenencies), and flag if they aren't
found.

Some kind of convention could be used to identify these
thingies. Maybe a DEPEND.pl file that could be included in module
distributions, and a ExtUtils::Dependecies module to help out. Hell,
the whole thing could be just rolled up into Makefile.pl.

Just a thought.

--
Stuart McDow                                     Applied Research Laboratories

  "It is obvious that about 750,000 people ago, Austin was a wonderful City."



Mon, 23 Oct 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Ever Wonder Why Not Everyone Uses Modules?

2. wondering why this doesn't work

3. CPAN & Module gripes (was Re: Ever Wonder...?)

4. CPAN & Module gripes (was Re: Ever Wonder...?)

5. why no one ever reply?

6. Newbie wonders how to use ROMBERG integral module

7. O_OBJECT uses warn() not croak(), why?

8. perl is the worst program I've ever used

9. Using modules or not?

10. Using Eval Statement To Trap Module Not Present Fatal Error

11. using a perl module located not in the usual place

12. email attachment not in body of email using Lite module

 

 
Powered by phpBB® Forum Software