[8886] in Perl-Users-Digest
Perl-Users Digest, Issue: 2502 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 5 12:17:30 1998
Date: Tue, 5 May 98 09:00:34 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 5 May 1998 Volume: 8 Number: 2502
Today's topics:
Re: #PERL the IRC Channel on Efnet. (Excession)
Re: #PERL the IRC Channel on Efnet. (Chris Nandor)
Re: #PERL the IRC Channel on Efnet. (Excession)
256 char limitation? <pittdno@spamexecpc.com>
Re: [Q] subsitute <sowmaster@juicepigs.com>
Re: cgi-lib.pl or CGI.pm? <upsetter@shore.net>
Re: CGI.pm/cgi-lib.pl benchmark (Was: cgi-lib.pl or CGI <upsetter@shore.net>
Re: Chicago Perl Mongers meeting May 8 (Andy Lester)
Compare integes is faster than compare strings also in <teilipe@tss.tei.ericsson.se>
Re: Complete Newbie - Where do I start? <aqumsieh@matrox.com>
Re: Computing length of hash (Mark-Jason Dominus)
Re: condition to subroutine <sowmaster@juicepigs.com>
Re: CPAN & Module gripes (was Re: Ever Wonder...?) (Clinton Pierce)
Re: CPAN & Module gripes (was Re: Ever Wonder...?) (Chris Nandor)
Re: CPAN & Module gripes (was Re: Ever Wonder...?) (Chris Nandor)
Re: CPAN & Module gripes (was Re: Ever Wonder...?) cpierce1@ford.com
Re: CPAN & Module gripes (was Re: Ever Wonder...?) (Clinton Pierce)
Re: directorys and Files? <quednauf@nortel.co.uk>
Re: directorys and Files? <lr@hpl.hp.com>
Re: Ever Wonder Why Not Everyone Uses Modules? (Chris Nandor)
Re: Ever Wonder Why Not Everyone Uses Modules? (Chris Nandor)
Re: Ever Wonder Why Not Everyone Uses Modules? <dballing@speedchoice.com>
formatting variables <soetensi@se.bel.alcatel.be>
Re: formatting variables <lr@hpl.hp.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 05 May 1998 13:50:18 GMT
From: daclay@NOSPAMzip.com.au (Excession)
Subject: Re: #PERL the IRC Channel on Efnet.
Message-Id: <354f1414.43358154@news.zip.com.au>
pudge@pobox.com (Chris Nandor) wrote:
> dac@NOSPAM.pcug.org.au wrote:
>
># amagosa sets mode: -o+b Dac *!*freeb@*.zip.com.au
># *** Log file closed: 5/05/98 6:20:39
>You are not being entirely honest. I convinced amagosa not to ban you, if
>you would not try to start fights. And frankly, I and everyone else in
>#perl who are familiar with you thought that the last line you said there
>was meant to be an "up yours" to amagosa.
I am being -scrupulously- honest, Pudge.
With regards to your assistance in the matter, I thanked you at the time,
and I'll thank you again here, publicly. I also wish to acknowledge jjohn
and rudefix for their assistance at the time.
#perl still has a ban on my isp (zip.com.au), and it's the one that amagosa
has implemented via the channel bot 'select' and refuses to lift.
He has the option of /ignore, and he chooses to use ban instead -- his
decision is bad, and he should be TOLD that his decision is a bad one,
preferably by his peers. I contend that, as his peers, you and others
have approached him, and have all been given his staunch refusal to lift
the ban; He should not have reimposed the ban.
By allowing the ban to stay in place, #perl allows this small-minded little
boy to continue with his irrational actions, and therefore implicitly
condones such actions.
If that is the kind of IRC channel ethics #perl wishes to promote, then I
can do nothing about it -- my attempts to point out the situation in #perl
in clpm was one of the few avenues open to me to try and bring more
pressure upon Jeff Wheeler to grow up and co-exist within the net, instead
of playing an "us vs them" game of little or no value to anyone.
>Yes, amagosa was out of line. But another op (me) stepped in to fix
>things. But you couldn't let it rest, so he kicked you again. The fault
>rests not solely on him.
I came back onto the channel, and politely requested that he use /ignore.
That is not an unreasonable request. There *is* no way to deal reasonably
with a person who considers using maximum force as the -first- step in
solving his personal problems.
It would be interesting to tally up the number of bans in the channel, and
those initiated by amagosa -- well, unless one already knows the outcome,
which is 80 bans total (only using my logfile, I have no other resources),
with a large percentage of those belonging to two people -- amagosa being
the person with -the- most bans set in the channel (12).
But reason, logic, and sensibility will never triumph over the actions of
hormone flooded teenagers who are so willing to use their bytestick on as
many people as they consider they can comfortably do before overstepping
the mark.
I have little doubt that this storm-in-a-teacup is of little interest to
anyone. The primary purpose of my bringing it to clpm's attention was to
advertise to a wider audience, amagosa's increasingly perverse actions.
Hopefully achieving someone (or a lot of someones) suggesting to him that
he might reconsider his actions.
Cordially,
Dac
---
David Andrew Clayton # Please remove NO_SPAM when
dac@NOSPAM.pcug.org.au # sending email replies.
I post therefore I am. #
------------------------------
Date: Tue, 05 May 1998 10:35:18 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: #PERL the IRC Channel on Efnet.
Message-Id: <pudge-0505981035190001@ppp-4.ts-1.kin.idt.net>
In article <354f1414.43358154@news.zip.com.au>, dac@NOSPAM.pcug.org.au wrote:
# I came back onto the channel, and politely requested that he use /ignore.
That is where I believe you are not being honest. You were not polite;
you were being polite on the surface, but has a snide attitude along with
it. At least, we all thought so.
# It would be interesting to tally up the number of bans in the channel, and
# those initiated by amagosa -- well, unless one already knows the outcome,
# which is 80 bans total (only using my logfile, I have no other resources),
# with a large percentage of those belonging to two people -- amagosa being
# the person with -the- most bans set in the channel (12).
80 bans? You can't even have that many on an IRC channel on EFNet,
AFAIK. And no, I see no band for you there anymore (there might have been
one before). Look, pissing off an op is grounds for getting kicked and
banned. When you come back on, just don't talk to him.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 05 May 1998 15:30:53 GMT
From: daclay@NOSPAMzip.com.au (Excession)
Subject: Re: #PERL the IRC Channel on Efnet.
Message-Id: <354f3053.50589946@news.zip.com.au>
On Tue, 05 May 1998 10:35:18 -0400, pudge@pobox.com (Chris Nandor) wrote:
># It would be interesting to tally up the number of bans in the channel, and
># those initiated by amagosa -- well, unless one already knows the outcome,
># which is 80 bans total (only using my logfile, I have no other resources),
># with a large percentage of those belonging to two people -- amagosa being
># the person with -the- most bans set in the channel (12).
>
>80 bans? You can't even have that many on an IRC channel on EFNet,
That was from parsing my logfile.
>AFAIK. And no, I see no band for you there anymore
Yes, I am back on #perl and things are calm, as long as Jeff is asleep
(30000 seconds and counting) things should be "totally icebox, man!"
Dac
---
David Andrew Clayton # Please remove NO_SPAM when
dac@NOSPAM.pcug.org.au # sending email replies.
I post therefore I am. #
------------------------------
Date: Tue, 05 May 1998 10:39:18 -0500
From: N/A <pittdno@spamexecpc.com>
Subject: 256 char limitation?
Message-Id: <6inbnn$rnh@newsops.execpc.com>
If this is a repeat question let me know and I will just shoot
myself..., but I have read the FAQ, this and other newsgroups, etc...
and I understand about 1% of what I read, so forgive me for being
ignorant (I only started learning programming recently).
Now, if you still want to read the rest...I am have 1) a problem and 2)
a question about client/server using sockets. I wrote a client and
server (yeah right..., mostly I have just cut and pasted code from
various sources), and it works pretty well! (Perl is co-o-o-ol!).
1) The problem is that if I try to send more than 256 chars from the
client to the server, the first 256 get lost and only the chars after
that show up at the other clients! In other words, if I type a paragraph
of text 280 chars long in the client terminal window, and hit return,
what the other clients see is chars 257-280! If I type less than 256,
they get it all! Is this a Solaris limitation, socket limitation, or
(doubtfully) Perl? I read somewhere that Perl did not have a limitation
on string length, but as I said, I need a lot more training in this
language (and programming in general) to find problem solutions in the
documentation.
2) My additional question is, how would you go about having the server
keep track of who logs in and out and be able to announce this to all
other clients? Or how could I do it on the client side? So far, on the
client side I have a log in for the users name, and send it to the
socket when they log in, and it's broadcast to everyone, so everyone
knows who logs in by their login name (Bill, George, whatever). No
problem. But when they dump out of their client (ie: ^C), the client
dies, and the server knows which socket has left, but there is no
correlation to the login name or IP address of that socket...so no one
knows who left. I thought about setting up an array or something to hold
login names and their relationship to created sockets, then somehow
trying to match the two when someone dumps out, and having the server
announce it, but WHEW, I don't know if that's possible (for me), or if
there's another way that would be better.
I can send all or part of the code if you like, but being a Perl "cub
scout", it is pretty long.
Thanks in advance,
Dan Pittenger
pittd@execpc.com
Daniel.Pittenger@med.ge.com
------------------------------
Date: Tue, 05 May 1998 11:39:24 -0400
From: Bob Trieger <sowmaster@juicepigs.com>
To: darknerd@shell4.ba.best.com
Subject: Re: [Q] subsitute
Message-Id: <354F32AC.2F73@juicepigs.com>
[mailed & posted]
darknerd@shell4.ba.best.com wrote:
>
> How would I take a date in the format of 5/4/98 at the beginning of a line
> and change it to 980504.
TMTOWTDI and this is how I'd do it.
($mo,$da,$ye) = split("/","5/4/98");
printf "%02d%02d%02d",$ye,$mo,$da;
Beware the 2 digit year.
--
Bob Trieger | Titanic: big boat, bigger
sowmaster@juicepigs.com | iceberg, big deal
------------------------------
Date: 5 May 1998 14:19:45 GMT
From: Art Cohen <upsetter@shore.net>
Subject: Re: cgi-lib.pl or CGI.pm?
Message-Id: <6in761$j1f@fridge.shore.net>
Martien Verbruggen <mgjv@comdyn.com.au> wrote:
: In article <354E293A.DBC1FFE@shell.com>,
: Yong Huang <yong@shell.com> writes:
:> Thanks, Sir. I wonder if you could give me a more specific example or reason
:> why CGI.pm is better than cgi-lib.pl. That is, I don't seme to be fully
:> convinced yet.
: What is unconvincing about CGI.pm being more reliable, less buggy,
: still supported, part of the standard distribution, having better
: debugging capabilities, being more flexible? What is unconvincing of
Maybe he -- like I -- am still waiting for a single concrete example of a
bug in cgi-lib.pl. And by the way, cgi-lib is still supported, see
http://cgi-lib.stanford.edu/cgi-lib/ .
--Art
National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html
------------------------------
Date: 5 May 1998 14:18:10 GMT
From: Art Cohen <upsetter@shore.net>
Subject: Re: CGI.pm/cgi-lib.pl benchmark (Was: cgi-lib.pl or CGI.pm?)
Message-Id: <6in732$j1f@fridge.shore.net>
brian d foy <comdog@computerdog.com> wrote:
: if speed and load are issues, use mod_perl [1] or fast-cgi [2].
I know you mean well, but do you realize how impractical those suggestions
are for a lot of us who are simply trying to get working scripts out the
door?
And I still haven't seen anyone produce one concrete example of a bug in
cgi-lib.pl.
--Art
National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html
------------------------------
Date: 5 May 1998 14:59:43 GMT
From: petdance@maxx.mc.net (Andy Lester)
Subject: Re: Chicago Perl Mongers meeting May 8
Message-Id: <6in9gv$prs$1@supernews.com>
: The next meeting of the Chicago chapter of Perl Mongers will be
: held this Friday, May 8, at Cafe Iberico, 739 N. LaSalle. Meeting time is
: around 6 PM, with drinks and (eventually) dinner. All interested parties
: are invited to attend.
Is it true that with the cuts in funding that the donuts and dancing girls
are being replaced with Cheerios and waddling old ladies?
xoxo,
Andy
--
--
Andy Lester: <andy@petdance.com> http://tezcat.com/~andy/
Chicago Shows List: <shows@ChicagoMusic.com> http://ChicagoMusic.com/
------------------------------
Date: Tue, 05 May 1998 13:51:19 +0200
From: Peng Li <teilipe@tss.tei.ericsson.se>
Subject: Compare integes is faster than compare strings also in perl?
Message-Id: <354EFD37.5D3D1973@tss.tei.ericsson.se>
This is a multi-part message in MIME format.
--------------0357A0905BBBFC5622118E81
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sorry for a stupid qustion, I am a new programer of PERL,
someone told me in PERL all integers are converted to
strings, this cause me a question:
if there are two strings scalar variables($a, $b) and two integer
variables ($c, $d), which comparation is faster?
1) if ( $a eq $b ) { ...}
2) if ( $c == $d ) { ... }
Thanks in advancd for your help.
/peng
--------------0357A0905BBBFC5622118E81
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Peng Li
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Peng Li
n: Li;Peng
org: Ericsson Telecomunicazioni SpA
adr: Via Anagnina, 203;;;Roma;;00040;Italy
email;internet: teilipe@tss.tei.ericsson.se
title: Technical Coordinator & Designer
tel;work: +39 6 7258 2911
tel;fax: +39 6 7258 3127
x-mozilla-cpt: maxwell;2
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------0357A0905BBBFC5622118E81--
------------------------------
Date: Tue, 05 May 1998 10:24:10 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Complete Newbie - Where do I start?
Message-Id: <354F210A.686D6D56@matrox.com>
Arch wrote:
> I hope someone can point me in the right direction....
>
> I want to learn Perl primarily to use at work.The only person where I
> work who knows Perl is leaving, but isn't replaced. A lot of Perl
> programs will be left behind, and I've been given the job of taking
> over.
>
> My programming skills are a little rusty - I was a decent "hobbyist"
> machine code programmer a few years ago, but the need and the interest
> wore thin.
>
> Can anyone please tell me a good book to buy, or offer me any other good
> advice?
> I need to be up to speed in about three weeks!
>
It took me that exact same period of time to have a good command over perl.
But it will take much more than that to completely master it. You SHOULD
start with the Llama book:Learning Perl by R. Schwartz .. published by
O'Reilly & Associates.
After you finish that, I suggest you read the Camel book:
Programming Perl by L. Wall, T. Chriostiansen and R. Schwartz .. same
publishers.
> Many thanks in anticipation.
>
> Brian Archer.
Enjoy .. ( I am sure you will :-) )
--
Ala Qumsieh | "How much wood would a woodchuck
ASIC Design Engineer | chuck if a woodchuck could
Matrox Graphics Inc. | chuck wood?"
Montreal, Quebec | - Trivial ... 5!
------------------------------
Date: 5 May 1998 11:18:56 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Computing length of hash
Message-Id: <6inal0$j38$1@monet.op.net>
Keywords: apostle fount hunk superstitious
In article <354EB877.8354265@ubs.com>,
Ian Maloney <ian.maloney@ubs.com> wrote:
>In the Camel book (p.183) the recommended way to get the length of a
>hash is with:
>
>scalar keys %hash;
>
>My guess is that this is quite 'expensive' as it has to first build the
>list of keys,
Your guess is wrong. You forgot the Rule:
Just because you know what some function does in array context
doesn't mean you know what it will do in scalar context.
In particular, it does not build a list of keys.
For tied hashes, it has to iterate over the keys to count them, but it
still doesn't build a list. For regular hashes, it just goes to the
place in the hash structure where it was keeping track of the number
of entries, and returns the number.
>My question is: am I correct in thinking that this is an expensive
>operation?
No. For regular hashes, it will probably take about as long as
accessing a scalar variable.
> and is there an alternative?
No.
------------------------------
Date: Tue, 05 May 1998 11:04:44 -0400
From: Bob Trieger <sowmaster@juicepigs.com>
Subject: Re: condition to subroutine
Message-Id: <354F2A8C.496F@juicepigs.com>
Ilya Zakharevich wrote:
> <sowmaster@juicepigs.com>],
> who wrote in article <354E701D.76CD@juicepigs.com>:
> > I also learned empty parens aren't needed when ampersand is used.
>
> Whatdoyoumean, "aren't needed"? They provide a different semantic.
I haven't used the ampersand since I found out it wasn't needed in perl
5. When I call a subroutine that needs no values passed to it I've been
doing it via: SUBROUTINE(); Have I been missing something important
for a couple of years? Are there any meaningful differences between
"&SUB" and "SUB()"?
--
Bob Trieger | Titanic: big boat, bigger
sowmaster@juicepigs.com | iceberg, big deal
------------------------------
Date: 5 May 1998 13:21:26 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <6in3om$qd84@eccws1.dearborn.ford.com>
In article <m3n2cxb7ag.fsf@furu.g.aas.no>,
Gisle Aas <aas@sn.no> writes:
>Eryq <eryq@zeegee.com> writes:
>
>> In case you're interested, the confusion is that MIME::Base64 and
>> MIME::QuotedPrint (written I think by Gisle) are included in libwww,
>> but MIME-tools is not; it's another bundle entirely, written by
>> me *on top of* Gisle's stuff.
>>
>> Perhaps Gisle's stuff should be extracted from libwww, and
>> distributed as MIME-core...?
>
>It is already unbundled and have be distributed as MIME-Base64 since
>1997-07-10.
>
>If you don't want to use CPAN.pm, then it is handy to have a local
>copy of CPAN/modules/02packages.details.txt which is a very grepable
>file.
>
>$ grep MIME 02packages.details.txt
>:
>:
>MIME::Parser 3.203 ERYQ/MIME-tools-3.204.tar.gz
>MIME::ParserBase 3.203 ERYQ/MIME-tools-3.204.tar.gz
>MIME::QuotedPrint 2.02 GAAS/MIME-Base64-2.03.tar.gz
>MIME::ToolUtils 3.204 ERYQ/MIME-tools-3.204.tar.gz
>
>(My copy of the file seem to not be very fresh.)
But we're not pointing CPAN newbies to that file--we're pointing them at
CPAN itself, which gives cryptic, misleading and self-contradictary
clues to Perl initiates.
Also, 02packages.details.txt doesn't give prerequisite information.
THAT seems to be embedded in the modules themselves.
--
+------------------------------------------------------------------------+
| Clinton A. Pierce | "If you rush a Miracle Man, | http://www. |
| cpierce1@ford.com | you get rotten miracles" | dcicorp.com/ |
| fubar@ameritech.net |--Miracle Max, The Princess Bride| ~clintp |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*
------------------------------
Date: Tue, 05 May 1998 10:45:24 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <pudge-0505981045390001@ppp-4.ts-1.kin.idt.net>
In article <6ilbgt$t1p@fridge.shore.net>, Art Cohen <upsetter@shore.net> wrote:
# Chris Nandor <pudge@pobox.com> wrote:
# : Since when can clueless newbies be expected to understand useful resources?
#
# Maybe because of the volumes of replies on this newsgroup that simply say
# "There's a module that does that available on CPAN".
If they are clueless newbies, they wouldn't understand how to use it
anyway. They need to get baptized by a little fire before they can use it
anyway. Navigating CPAN is a good way to do it.
# : 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.
#
# This is idiotic. It is not valid to assume that "newbie != programmer".
Where did I say it did? I specifically said "clueless newbie", and while
I did not say it before, I will say it now: a clueless newbie is not a
programmer.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 05 May 1998 10:45:41 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <pudge-0505981045550001@ppp-4.ts-1.kin.idt.net>
In article <6ila3p$53b$2@marina.cinenet.net>, cberry@cinenet.net (Craig
Berry) wrote:
# Chris Nandor (pudge@pobox.com) wrote:
# : So what does any of this have to do with CPAN? Complain to the module
# : authors for better docs.
#
# CPAN consists entirely of a search/retrieval interface plus the contained
# modules. Of these, the modules are by far the more important part. If
# the module descriptions suck, then CPAN sucks.
Can you blame Blockbuster because most movies made today suck? Or a
library for certain books that suck? That makes no sense to me.
# : No, this is not the most intuitive system. No, it is not perfect. But
# : learn how to use it before complaining.
#
# I've learned how to use it, as (it seems to me) the original poster has.
# May we complain (constructively), now?
Yes, you have, but others have not. That was more a general statement to
the world. :)
Still, don't complain about CPAN if module descriptions suck, send an
e-mail to the author. The author is in control of how it is described.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 05 May 1998 10:26:10 -0600
From: cpierce1@ford.com
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <6inb2h$fn8$1@nnrp1.dejanews.com>
pardon the DejaNews post. Local newsfeed is for crap this week.
In article <6ila3p$53b$2@marina.cinenet.net>#1/1,
> cberry@cinenet.net (Craig Berry) wrote:
> Chris Nandor (pudge@pobox.com) wrote:
> : So what does any of this have to do with CPAN? Complain to the module
> : authors for better docs.
>
> CPAN consists entirely of a search/retrieval interface plus the contained
> modules. Of these, the modules are by far the more important part. If
> the module descriptions suck, then CPAN sucks. [...]
Agreed! CPAN _IS_ the modules. From a "users" perspective, CPAN without
modules isn't anything I'm interested in...
> : 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.
>
> But it can be maddeningly hard to determine what's in each bundle, and
> what *bundles* depend on one another (e.g., libwww on libnet), without
> either lots of back-and-forth reading or trial and error, or more often
> both.
And to bring back an old theme, we're not telling users to get the
Bundle::LWP to do their web-programming, we're in the habit of telling
them "get the LWP module". CPAN's documentation doesn't make it
clear^H^H^H^H^Hobvious that hunting for a Bundle:: may get you what you
want--the module and its dependencies.
> : No, this is not the most intuitive system. No, it is not perfect. But
> : learn how to use it before complaining.
> I've learned how to use it, as (it seems to me) the original poster has.
> May we complain (constructively), now?
*sigh* the only thing in Chris' reply that I agreed with. I've learned to use
it, but along the way the learning experience was unnecessarily painful.
If Tom, Randal, Chip and the whole gang are beating on users to stop
re-inventing the wheel, and use the modules, then we've got to make the
modules easier to get to.
if (exists $USENET('RANT')) {
IMHO, I think this is a big part of the alarming FAQ's in this group.
Replying to a web question, or a "how do I telnet in perl" or socket
questions etc... with a "use the CPAN module"-type answer is a cop-out.
Laziness to the point of being obstructionism. For three years I've browsed
DejaNews for answers before posting, and the "use the module" answers
always frustrated me. Mostly because I could almost never find the module
they were talking about on CPAN, or get it installed without a lot of
problems--so I re-invented a LOT of Perl's wheels. Not a really good use
of my time.
If CPAN were a useful, easily searched, indexed, and well-maintained
resource then a pointer to CPAN would be a valid, helpful answer. I don't
blame the maintainers of CPAN much, a lot of the fault should lie on the
shoulders of the module authors. Writing modules with dependencies on
other modules just to get one-more cool feature makes a potentially useful
piece of code just that much harder to install. (But the CPAN Ego is hard
to overcome. Is an index by module _author_ really necessary, other than
for stroke value?) But since the re-invention of that module is strongly
discouraged by the Perl Cabal, the author has no incentive to keep his
descriptions up-to-date, dependencies low, and user-interface easy to use.
Thank the gods that CPAN has no competition.
A point made on a different branch of this thread was "but there's nothing
like this re-use resource anywhere in commercial or free software".
Absolutely! The idea of CPAN is wonderful. Doesn't mean we shouldn't
improve it. (Perl 4 is wonderful--doesn't mean we should still be running
it!)
}
I don't mean point-and-click installation, with automagic configuration. I
mean descriptions that are accurate (or at least not wrong!). Dependency
information I can get without having to download the tarfile, unbundle it,
and browse the README.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 5 May 1998 15:38:22 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <6inbpe$qgg3@eccws1.dearborn.ford.com>
In article <pudge-0505981045550001@ppp-4.ts-1.kin.idt.net>,
pudge@pobox.com (Chris Nandor) writes:
>In article <6ila3p$53b$2@marina.cinenet.net>, cberry@cinenet.net (Craig
>Berry) wrote:
>
># Chris Nandor (pudge@pobox.com) wrote:
># : So what does any of this have to do with CPAN? Complain to the module
># : authors for better docs.
>#
># CPAN consists entirely of a search/retrieval interface plus the contained
># modules. Of these, the modules are by far the more important part. If
># the module descriptions suck, then CPAN sucks.
>
>Can you blame Blockbuster because most movies made today suck? Or a
>library for certain books that suck? That makes no sense to me.
No, but you can blame Blockbuster if:
The movies are in the wrong boxes.
The boxes are on the wrong shelves.
And to rent "Terminator 2" you _must_ have previously rented
"Terminator" and "Caddyshack". But you're not told
that until you get your movie home and your VCR
dies.
--
+------------------------------------------------------------------------+
| Clinton A. Pierce | "If you rush a Miracle Man, | http://www. |
| cpierce1@ford.com | you get rotten miracles" | dcicorp.com/ |
| fubar@ameritech.net |--Miracle Max, The Princess Bride| ~clintp |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*
------------------------------
Date: Tue, 05 May 1998 14:47:40 +0100
From: "Frank L. Quednau" <quednauf@nortel.co.uk>
Subject: Re: directorys and Files?
Message-Id: <354F187C.59D4852E@nortel.co.uk>
>
>
> You really should spend some time reading the perl documentation.
>
> # perldoc perl
> # perldoc perlsyn
> # perldoc perldata
> # perldoc perlop
> # perldoc perlfunc
>
Hi, is this actually an automated response? 'cos the answer is actually shorter
than what you have written ;)
opendir(CB,"$filebase") || die "Cannot opendir:$!";
foreach $file (sort readdir(CB)) {
push (@files, $file);
}
Just as an example; TIMTOWTDI..:)
--
____________________________________________________________
Frank Quednau
Phone: +44 (0)1279 402447
http://www.surrey.ac.uk/~me51fq MailTo:F.L.Quednau@bnr.co.uk
____________________________________________________________
------------------------------
Date: Tue, 5 May 1998 08:04:02 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: directorys and Files?
Message-Id: <6inadm$kka@hplntx.hpl.hp.com>
[posted and mailed]
Frank L. Quednau wrote in message <354F187C.59D4852E@nortel.co.uk>...
...
> opendir(CB,"$filebase") || die "Cannot opendir:$!";
>foreach $file (sort readdir(CB)) {
> push (@files, $file);
>}
...
foreach $file (sort grep !/^\.\.?$/, readdir(CB)) {
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Tue, 05 May 1998 10:56:55 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <pudge-0505981057090001@ppp-4.ts-1.kin.idt.net>
In article <alecler-0405982228030001@dialup-392.hip.cam.org>,
alecler@cam.org (Andre L.) wrote:
# I rather think that blindly using ready-made routines is not the best way
# to get to know what you're doing. Studying them, on the other hand, is a
# great way to learn, and to figure out the best way to do it.
I agree. However, when someone says "how do I do x?", we point to
modules. If someone wants to learn from them, fantastic. If they don't
understand how something in them works, fantastic. But they should be
used as a starting point in most any event.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 05 May 1998 10:57:20 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <pudge-0505981057350001@ppp-4.ts-1.kin.idt.net>
In article <6ilc1m$t1p@fridge.shore.net>, Art Cohen <upsetter@shore.net> wrote:
# Chris Nandor <pudge@pobox.com> wrote:
#
# : # : 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.
#
# Thanks for being a complete dick, not to mention completely unhelpful.
My pleasure, and yours, I hope.
I was very helpful. If you read the docs, you would understand the
modules. What else can be said?
# If you'd bother to read my original post, you'd see that all I wanted to
# do was explore alternate ways of sending email. If using Net::SMTP
# requires 100% comprehension of two or three completely unrelated modules,
# it hardly seems worth the trouble. Some of us have work to do.
perl -MCPAN -e shell
install Bundle::libnet
That is not a lot of trouble or work. And if you have to be bothered to
read a few docs along the way, so? How is that a problem?
# People on this newsgroup are quick to say "Don't re-invent the wheel;
# there's a module that already does that"... but when figuring out how to
# install said module takes ten times longer than it would take to just
# write the code to accomplish the task at hand, you'll forgive me for
# re-inventing.
I don't care if you reinvent. Be my guest. But unless you don't
understand how to use CPAN, or something you have is broken, then it does
not take any significant amount of time to set it up and read the docs.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 05 May 1998 09:34:17 -0500
From: Derek Balling <dballing@speedchoice.com>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <302E5B581AFED883.420BD151E48BF084.C9E18FF0A5FC9F05@library-proxy.airnews.net>
John Porter wrote:
> > Sure you have compiler support? Many of the newer isp's that allow
> > perl cgi wont allow C compilers to run. Mine is that way - don't
> > even have shell access (ftp upload, server sets permissions, and we
> > gets one write directory) - so modules are out of the question. (I
> > wouldn't use them anyway).
> How convenient for you! I wouldn't have an account without a shell.
Then you wouldn't have an account at a large percentage of
ISP's these days, since most are getting away from allowing
people to have shell accounts.
------------------------------
Date: Tue, 05 May 1998 16:42:25 +0200
From: Inge Soetens <soetensi@se.bel.alcatel.be>
Subject: formatting variables
Message-Id: <354F2551.54BC@se.bel.alcatel.be>
Hi,
is there a way to define the length of a variable ?
ie. I have a variable $test.
This variable can have a value between 1 and 200.
When this variable is written to a file, I would like to have it
in a column.
So it should look like this :
1
2
...
15
...
100
And what about strings ?
Is this also possible for strings ?
------------------------------
Date: Tue, 5 May 1998 08:27:06 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: formatting variables
Message-Id: <6inb5d$ksa@hplntx.hpl.hp.com>
[posted and mailed]
Inge Soetens wrote in message <354F2551.54BC@se.bel.alcatel.be>...
>Hi,
>
>is there a way to define the length of a variable ?
>
>ie. I have a variable $test.
>This variable can have a value between 1 and 200.
>When this variable is written to a file, I would like to have it
>in a column.
>So it should look like this :
> 1
> 2
>...
> 15
>...
>100
s?printf '%3d', ...
>And what about strings ?
>Is this also possible for strings ?
$max_length = ...
s?printf "%${max_length}s", ...
You can do lots of other things, too, such as left-justification or
padding with leading zeros. See the Perl documentation for 'sprintf' or
the C documentation for 'printf'.
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 2502
**************************************