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

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.

--Art

National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
        Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?

 [courtesy cc of this posting sent to cited author via email]


:I'm trying to use Net::SMTP, as most of the gurus on this group recommend
:it over piping commands to sendmail directly.

Not this one.  

--tom
--

    "I will always write it the second way, so if you're optimizing for
    contrariness, it's obviously better to do it the second way."
        --Larry Wall



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?

Quote:

>  [courtesy cc of this posting sent to cited author via email]


> :I'm trying to use Net::SMTP, as most of the gurus on this group recommend
> :it over piping commands to sendmail directly.

> Not this one.

> --tom

Just curious, why?  It would seem to be quite a bit safer then piping to
sendmail -t or mail or some other method.  What are the pros, cons?

Brian Mathis



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?

Quote:

> 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.

Just making sure: have read the FAQs that deal with this issue?
You otherwsie might miss some necessary step.

Quote:
> 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.

Don't try to install Net::SMTP in isolation.  You want libnet.

 (CPAN): /modules/by-module/Net/libnet-1.0605.tar.gz

Quote:
> As I try to install Data::Dumper, I get this message:
> gcc: installation problem, cannot exec `cpp': No such file or
> directory

You might need to do the no-xsub install, as documented in the README
that accompanies Data::Dumper.

--



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?

 [courtesy cc of this posting sent to cited author via email]


:Just curious, why?  It would seem to be quite a bit safer then piping to
:sendmail -t or mail or some other method.  What are the pros, cons?

How can the module be 'safer'?

Perl is about gluing things together.  Programs are some of the things
we glue together, by using pipes.  Pop (plain old perl) programming
should not be disparaged out of Programmatic Correctness.

    open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq")

This approach also has other advantages.  Notice the -odq, for example.

--tom
--

    The debate rages on: Is PL/I Bactrian or Dromedary?



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?

You know, it's very annoying to reply to an (unmarked) email cc only to
discover that the same message was also posted to the group. Doesn't your
newsreading software give you an option to put "posted and mailed" at the
top of the message?

: Don't try to install Net::SMTP in isolation.  You want libnet.

I should have been more specific... I was installing the whole libnet
package.

: You might need to do the no-xsub install, as documented in the README
: that accompanies Data::Dumper.

I'll take another look at the docs, but you're not doing anything to
convince me that using this module will be worth the trouble. I don't know
or care what Data::Dumper does... I just want to send some email, and if I
were working on a project with a deadline I would have just written the
code to communicate with sendmail myself (several hours ago) and been done
with it.

Furthermore, if using module x requires a special installation of module
y, that makes it all the more unlikely that I'd ever use it on a client's
site.

--Art

National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
        Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?



Quote:
>Furthermore, if using module x requires a special installation of module
>y, that makes it all the more unlikely that I'd ever use it on a client's
>site.

I agree 100%.  CPAN is a pain in the ass to use.  It's a lot like an
unordered phone book--potentially useful, but not really.

Trying to find a module (library, etc...) to do something simple can be
overwhelming.  If I'm a clueless newbie trying to, say, decode MIME
E-Mail messages (semi-random example).  First, there's no hints in the
Documentation, other than to hunt around in CPAN.

CPAN (on a browser) presents a lits of directories, and a self-Congratulatory
message (the README), and references for further reading.  Further reading
does explain what the directories are about--so far so good.

Searching for MIME turns up a plethora of MIME references, but the
interesting one seems to be MIME::Parser.  Clicking on that takes me to a
listing of MIME-{Base64,Lite,tools,ispmailgate}.*.  None of which looks
anything like the MIME::Parser module I asked for.  Going BACK to the
CPAN.html#mime page gives you no hint that you need "MIME-tools.*".
Clicking on various README's will eventually turn up MIME-tools as
being the correct package.

But wait, the comment in CPAN.html says that it's not part of the
libwww bundle.  Do I need libwww?  Is it a prerequisite?  Clicking on
libwww bundle says that MIME is _included_ in libwww.  So which do I
want, libwww or MIME-tools.  (The descriptions for MIME and libwww
in regards to MIME:: are contradictory.   At least _VERY_ confusing.)

IF I had been misfortunate enough to search and stumble across libwww
first (instead of the MIME::Parser description), I might have downloaded
libwww, seen in the README that MIME-Base64, libnet and MD5 were all
prereqs, downloaded them, built them, built libwww and STILL HAD NO
MIME::Parser.

By sheer dumb luck, I would have avoided a LOT of frustrating work.  But
only dumb luck.

For CPAN to be more useful, IMHO, Module authors (and CPAN maintainers)
need to somehow embed dependency information into the modules.  That
would allow CPAN to present you with the option of downloading the
desired module--and its dependencies all in one shot.  This would also
help keep the descriptions up to date about which modules are embedded
in which packages (i.e. MIME is _NOT_ part of libwww, despite what the
documentation says).

If Perl allows self-documenting programs, then there's no reason not
to extend this outward towards the modules...

--
+------------------------------------------------------------------------+
|  Clinton A. Pierce    |   "If you rush a Miracle Man,   | http://www.  |


+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?

Quote:

> For CPAN to be more useful, IMHO, Module authors (and CPAN maintainers)
> need to somehow embed dependency information into the modules.  That
> would allow CPAN to present you with the option of downloading the
> desired module--and its dependencies all in one shot.

Does this not work for you?

   # perl -MCPAN -e shell

   cpan> install MIME::Parser

The CPAN module does indeed know about dependencies, etc.  Try it, if
you haven't already.

--



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?

Quote:

> You know, it's very annoying to reply to an (unmarked) email cc only to
> discover that the same message was also posted to the group. Doesn't your
> newsreading software give you an option to put "posted and mailed" at the
> top of the message?
[...]
> --Art

I'm sorry for the inconveinence.  I usually send an email reply, as well
as a newsgroup one, for courtesy of the original poster.  Many people
post questions, and often time an email response gets to them much
faster than waiting for a usenet reponse to propagate through the
system.  Quit your whining, it's not like you were spammed or anything.


Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?


# > As I try to install Data::Dumper, I get this message:
# > gcc: installation problem, cannot exec `cpp': No such file or
# > directory
#
# You might need to do the no-xsub install, as documented in the README
# that accompanies Data::Dumper.

Read the docs?  Are you crazy?  Next time you'll want me to ask for directions!


#
# : Don't try to install Net::SMTP in isolation.  You want libnet.
#
# I should have been more specific... I was installing the whole libnet
# package.

Then you should have installed Bundle::libnet, which includes Data::Dumper.

# : You might need to do the no-xsub install, as documented in the README
# : that accompanies Data::Dumper.
#
# I'll take another look at the docs, but you're not doing anything to
# convince me that using this module will be worth the trouble. I don't know
# or care what Data::Dumper does...

Then don't bother using libnet.  If you cannot be bothered to read the
docs, then that is YOUR problem.

--

MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?



Quote:

>> For CPAN to be more useful, IMHO, Module authors (and CPAN maintainers)
>> need to somehow embed dependency information into the modules.  That
>> would allow CPAN to present you with the option of downloading the
>> desired module--and its dependencies all in one shot.

>Does this not work for you?

>   # perl -MCPAN -e shell

>   cpan> install MIME::Parser

>The CPAN module does indeed know about dependencies, etc.  Try it, if
>you haven't already.

Not if you're behind _very_ thick firewalls, as at Ford Motor Co.

--
+------------------------------------------------------------------------+
|  Clinton A. Pierce    |   "If you rush a Miracle Man,   | http://www.  |


+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*



Fri, 20 Oct 2000 03:00:00 GMT  
 Ever Wonder Why Not Everyone Uses Modules?




# >Furthermore, if using module x requires a special installation of module
# >y, that makes it all the more unlikely that I'd ever use it on a client's
# >site.
#
# I agree 100%.  CPAN is a pain in the ass to use.  It's a lot like an
# unordered phone book--potentially useful, but not really.

I am going to search in vain for support for this statement.

# Trying to find a module (library, etc...) to do something simple can be
# overwhelming.  If I'm a clueless newbie trying to, say, decode MIME
# E-Mail messages (semi-random example).  First, there's no hints in the
# Documentation, other than to hunt around in CPAN.

Since when can clueless newbies be expected to understand useful resources?

# Searching for MIME turns up a plethora of MIME references, but the
# interesting one seems to be MIME::Parser.  Clicking on that takes me to a
# listing of MIME-{Base64,Lite,tools,ispmailgate}.*.  None of which looks
# anything like the MIME::Parser module I asked for.  Going BACK to the
# CPAN.html#mime page gives you no hint that you need "MIME-tools.*".
# Clicking on various README's will eventually turn up MIME-tools as
# being the correct package.

Good, you read the docs, that wasn't so hard, now was it?

# But wait, the comment in CPAN.html says that it's not part of the
# libwww bundle.  Do I need libwww?  Is it a prerequisite?  Clicking on
# libwww bundle says that MIME is _included_ in libwww.  So which do I
# want, libwww or MIME-tools.  (The descriptions for MIME and libwww
# in regards to MIME:: are contradictory.   At least _VERY_ confusing.)

So what does any of this have to do with CPAN?  Complain to the module
authors for better docs.

# For CPAN to be more useful, IMHO, Module authors (and CPAN maintainers)
# need to somehow embed dependency information into the modules.  That
# would allow CPAN to present you with the option of downloading the
# desired module--and its dependencies all in one shot.

Hello?  That is why there are Bundles.  If you had installed Bundle::LWP,
you would get all the dependencies for it.  Likewise with Bundle::libnet.

No, this is not the most intuitive system.   No, it is not perfect.  But
learn how to use it before complaining.

"Hello, tech support?  Netscape doesn't work on my home computer."  "Is
your modem connected?"  "My what?"

You say above that clueless newbies should be able to figure it out.  Why
on earth should clueless newbies be able to do this?  CPAN is made by
programmers for programmers.  If you are not a programmer, you won't get
it, and naught a user here will shed a tear.

--

MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])



Fri, 20 Oct 2000 03:00:00 GMT  
 
 [ 32 post ]  Go to page: [1] [2] [3]

 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