RE: On Perl CPAN modules
by merlyn (Sage) on Sep 30, 2000 at 21:52 UTC
|
Well, I find it hard to believe that the five minutes that it would take
you to type perl -MCPAN -eshell followed by install HTTP::Request::Common would be longer than you reinventing everything
that module calls, including getting it right for the general case. That's why I boggle sometimes at the "no module" crowd.
And even if you don't have good net access, I've seen entire CPAN disks on CD-ROM,
so no net connection is required.
You also misinterpret Tom Christiansen. The point of PPT is not to reinvent
Unix because he can. The point is to give Unix tools to the unwashed Windows
masses, which he considers impoverished. Many of those programs use CPAN
modules heavily, so it actually discredits your argument. {grin}
The problem with CGI.pm is not its size: it's that there's so many
things to do to handle CGI in general. Every time I've seen something scaled
down, it didn't handle something that would eventually have to be handled by
adding more code, which already existed in CGI.pm. And CGI.pm
is already very agressive at being a "compile as you go" module, minimizing
startup cost.
OK, do you have any objections other than those to using CPAN modules? Bring
them on. {grin}
-- Randal L. Schwartz, Perl hacker | [reply] |
|
What if you don't have ANYTHING but the bare
distro? No money to buy a CD. No connection (I may be in class).
Answer me that. $time{&to("install",$module)}=5 if(&$i{"had"}("internet connection"));
About Tom: *WHAT?!?* Great, time to make a Linux distro...
About CGI.pm: CGI.pm is a catch-all, and many people have
told about it's problems both here, on other sites, and on dead-tree print
(Linux Jornal comes to mind). From what I've seen, even with CGI.pm's minimization,
it still takes a long time to compile, and it looks like the best
thing to advoid on speed-critical scripts.
Oh, yeah, now that you mention it: Module dependencies on modules.
I'm getting confused over what GIMP::Perl wants, which needs PDL, which needs...
well, it's a nice documentation problem which I wish was shifted over
to program side. I'll love to have it so I can do a "perl Makefile.pl -print-needed-modules".
Has that been solved? Will CPAN Modules have a INSTALL file in the archives? What about the
moderate newbie (which I seem to be turning out to).
--
&$WolfSkunks({use Perl;}); do {$you};
| [reply] |
|
Reading your posts, I am a little unclear as to your point of view.
regarding your position on modules, is it:
A. Internet access is difficult or near impossible, so by default, you're remanded to rolling your own, unless included with whatever distro you're running?
B. You're a "purist", and regardless of internet connectivity, you'd prefer to do without?
If you're answer is B, then why not politely tell us, "Thanks but this is how I feel", and move on. If it's A, then you've got options. Also, I'm having a hard time understanding where your sense of urgency fits in. I really can't comment on some of the points you make regarding specific modules and PPT, never having used them, but while criticizing them, remember that the folks who wrote these, did so primarily in their spare time, and provided them to the Perl community freely. Yes, there are problems, but rather than just complaining and becoming part of the problem, become a pro-active part of some solution, like submitting cohesive, accurate bug-reports to the respective maintainers of the software you're having problems with. Better yet, if you have the skills, time, etc., volunteer to help fix or modify the problematic code! Don't like GIMP::Perl docs? Write 'em! "Wishing" will accomplish nothing.
| [reply] [d/l] [select] |
|
|
|
PS, I --'d your post because the beginning sounds more like, "if you were alone on a desert island, would you rather.....", than a question of real circumstance.
| [reply] |
|
| [reply] |
RE: On Perl CPAN modules
by Limo (Scribe) on Oct 01, 2000 at 01:17 UTC
|
"I may only be a user, not sysop, preventing me from installing and Perl Module."
perl Makefile.PL PREFIX="path/to/local/module/directory"
or
#!/usr/local/bin/perl -w
use strict;
use lib "path/to/local/module/directory";
Not to be a jerk, but in the time it took for you to write and submit your post, you could have taken merlyn's advice and:
dd if="some_module" of=/dev/fd0/"some_module"
I believe that most would fit on a floppy disk.
Update: To clarify, I realize that merlyn's suggestion would install a module locally. Since you intimated that installing a module on a stand-alone machine MIGHT be one of your restrictions, I was merely suggesting that you could d/l it for use on such a machine, since obviously you were already on the internet. | [reply] [d/l] [select] |
RE: On Perl CPAN modules
by clemburg (Curate) on Sep 30, 2000 at 21:54 UTC
|
The only possibility of achieving really impressive increases in productivity is
using other people's libraries.
<cite>Bruce Eckel. Thinking in C++, Prentice Hall, 1995.</cite>
As for speed, does it really matter? How long will it matter?
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
| [reply] |
|
Which is why we have the GPL. ;)
For speed, apparently it does matter -- with large websites.
Check that Training wheels again article.
--
&$WolfSkunks({use Perl;}); do {$you};
| [reply] |
|
Did you read the entire thread?
Specifically I am thinking of this post.
Secondly all that that thread showed, even with the original
numbers, is that you can do better on performance. But it
does not compare, for instance, the cost of buying more
machines versus having someone discover how to delete your
customer database.
Now if you want to learn more about performance, go
here.
Those slides have extremely good advice about how to wind
up being incredibly fast.
For the record, he uses CGI.pm.
| [reply] |
|
|
|
RE: On Perl CPAN modules
by extremely (Priest) on Oct 01, 2000 at 09:23 UTC
|
OK I understand the need/wish to do things for yourself.
I've played the "dat not borned here" game myself more than
once.
What confuses me is why you get so upset that people
point out the modules. Just let that slide. You can't get
all huffy about not having access to CPAN on this website,
because, HELLO, it's a WEBSITE. And you are going to have
a hard time convincing me you got perl installed on a
laptop that has no floppy drive, cdrom, modem or network card.
Worse, you are going to have a real hard time convincing
me that you write entire apps from scratch on your laptop
in some remote mountain villa where you have no internet
access.
I don't think modules off CPAN are always the answer
they are often the starting point. If it is too slow,
fix or replace it. If it doesn't have the capabilities,
add to it, fix it or replace it.
The guy who invented the wheel deserves a lot of credit,
the guys who worked to make it better deserve credit, the
guy who reinvents it poorer, less featured, and more specific
can't reasonably complain when people go "ho hum, you buy
those at Walmart, why carve them yourself, sloppily?"
And don't get me wrong here, your code was fine and
dandy and looked it through for new ideas and to see how
things worked. It's just that merlyn was more than correct
in pointing out that a complete, generalized version of
the same trick existed in a place where we all look for
code.
Code reuse is one of the Holy Grails of computing and Perl's
CPAN is the singular shining example I know of that shows the
promise of that quest. I can't imagine bothering to
rewrite CGI when it already exists. And I doubt greatly
that performance is that much of an issue that it needs
a faster core. If I were to do anything, I'd condsider
ripping CGI into sub modules as Mr. Stein keeps threatening
to do. You'd do us all a great service by taking CGI
and fixing it, you'd do us little good and yourself only
moderate good by stubbornly "fixing" it yourself, blind to
the YEARS of experience that have gone into making it
work well for the whol community.
#erk
Whups, that turned into a rant. Sorry.
--
$you = new YOU;
honk() if $you->love(perl)
| [reply] |
|
True, true, but in a place where there is no access (such as next
door to a very full computer lab w/no way to transfer files from one
computer to another) you're kinda stuck.
Splitting CGI.pm would be worth it, of course. However, from
what I've seen, rewriting it would be better. That, and I'm not
too sure about object orientation and perl in most cases.
--
&$WolfSkunks({use Perl;}); do {$you};
| [reply] |
|
I've quit calling Perl object oriented. I call it
"Object Capable" when describing it. It's not object oriented
at all, it's object occasionally wanders in the direction.
=P
One of the benefits to working in Perl is not being tied
down by "method"ology when you don't want it. Writing a
module only to discover that half of the methods are just
returning and setting state values tends to disgust me.
That is another benefit of the Perl community,
they rarely vilifiy procedural coding. Most of the perl
coders seem to have grown up from shell scripting.
Even the "classically trained" coders shed their inhibitions
and indulge.
--
$you = new YOU;
honk() if $you->love(perl)
| [reply] |
|
|
| [reply] |
|
|
Impatience and Hubris but more Laziness is required
by frankus (Priest) on Oct 04, 2000 at 16:26 UTC
|
Having 'more than one way to do it'
doesn't exclude doing it the hard way.
Advice is an example of the sharing in the Perl community,
CPAN is yet another; It is a synergy.
Modules are a repository of common-sense, access to CPAN is arguably beneficial to developers: strive* for access.
I feel there is vindicativeness in your post; as though someone had offended your code and intellect.
--
Brother Frankus.
* configue, advocate, persuade, hack | [reply] |
|
| [reply] |
|
--
Brother Frankus. | [reply] |
RE: On Perl CPAN modules
by Maclir (Curate) on Oct 02, 2000 at 18:35 UTC
|
I always shake my head when I see people looking for the "leanest" software implementation in an attempt to get faster performance:
Another point is speed. . . . A monk can infer that CGI.pm's bloated, slowing down hit requests. Cutting down the amount of fat, running lean, really works.
Really - with the performance of modern hardware, coupled with (lets say you are writing CGI applications) the inherent performance of Apache with mod_perl (you do use mod_perl, don't you?) performance is really not an issue. Of course, if you are trying to run a serious web site on a clapped out 486, what do you expect?
You want to improve CGI.pm's performance by spending a lot of time rewriting a "lean and mean" replacement? Save the money that you would burn in programmer time, and upgrade the hardware.
| [reply] |
|
I could go though several thousand ways of pointing out that
I don't have any money to throw at hardware anymore, nor
point out that...
Grumble. Time to rewire CGI.pm. I'd rather do that than
take out a loan for more hardware. Besides, I don't have a
site anyway.
And that, of course, is my opinion.
--
&$WolfSkunks({use Perl;}); do {$you};
| [reply] |