in reply to Bad Religion!
Theory is when you know all and nothing works. Practice is when all works and nobody knows why. (Albert Einstein)
As it relates to manipulexity and whipuptitude and religion, the modules work well in practice, but very few know why. Whearas, back in the pre-module days of Perl4, everyone could see why, but nothing worked. :-) The best example is the CGI module, try using the often seen manual Perl4 cgi readparse code
and compare it tosub ReadParse { local($name, $value, $pair, $buffer, @pairs); if ($ENV{'REQUEST_METHOD'} eq 'GET') { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); # @pairs = split(/&/, $buffer); # } else { $Error_Message = "Bad request method ($ENV{'REQUEST_METHOD'}). Use PO +ST or GET"; return(0); } foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $name =~ s/\n//g; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\n//g; $value =~ s/<!--(.|\n)*-->//g; # disallow SSI $in{$name} = $value; } return; }
The second modular one almost always works, but the average programmer does not know why. The first, allows the programmer to see why, but it seldom works out in the real world anymore.use CGI; my $query = CGI->new(); my @names = $query->param;
Other modules follow a similar course, try writing your own program to do mail with multiple attachments, then compare it's ease and functionality to code written using MIME::Lite. Or try writing your own html parser code.
There is no Bad Religion, in a world of religous freedom. There is just your religion and then there is the other guy's. The first step toward religous intolerance, is to start yelling the other guy has a bad religion.
It is true, some religions put you on the path to enlightenment faster, but maybe some people can't handle a quick awakening, so the slow paths to enlightenment are still needed.
Update: just to prove I'm susceptible too, see Gmail ssl pop mail stopped working. (SOLVED) , where my overlooking a simple thing like Content-type in the header, causes my manual code to fail, where the module worked!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |