Next | Making Programs Faster | 86 |
Another minor recommendation: Get rid of CGI::XMLPost
use CGI::XMLPost; my $xmlpost = CGI::XMLPost->new(); my $xml = $xmlpost->data();
If you look at the CGI::XMLPost code, you discover that what it's doing is:
my $cl = $ENV{CONTENT_LENGTH};
if ( read( STDIN, $self->{_data}, $cl) == $cl ) { return $self; }
The world is full of useless modules like this
They exist only to put a hokey OO interface on something that didn't need one
I suggested replacing it with:
my $xml; my $cl = $ENV{CONTENT_LENGTH}; unless ( read( STDIN, $xml, $cl) == $cl ) { print "Status: 404 Not Found\n"; ... print XMLLOG "bad post\n"; exit; }
Next | Copyright © 2003 M. J. Dominus |