[svn:qpsmtpd] rev 434 - trunk/lib/Apache
[email protected] 17 Jun 2005 13:33:58 -0000
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
Author: msergeant
Date: Fri Jun 17 06:33:57 2005
New Revision: 434
Modified:
trunk/lib/Apache/Qpsmtpd.pm
Log:
There's a hole in my bucket, dear Liza, dear Liza.
There's a hole in my bucket, dear Liza, a hole.
Go fix it, dear Henry, dear Henry, dear Henry.
Go fix it, dear Henry, dear Henry, fix it.
With what shall I fix it, dear Liza ... with what?
With a patch from Joe Schaefer, dear Henry ... with a patch.
Modified: trunk/lib/Apache/Qpsmtpd.pm
==============================================================================
--- trunk/lib/Apache/Qpsmtpd.pm (original)
+++ trunk/lib/Apache/Qpsmtpd.pm Fri Jun 17 06:33:57 2005
@@ -6,23 +6,23 @@ use 5.006001;
use strict;
use warnings FATAL => 'all';
-use Apache::ServerUtil ();
-use Apache::Connection ();
-use Apache::Const -compile => qw(OK MODE_GETLINE);
+use Apache2::ServerUtil ();
+use Apache2::Connection ();
+use Apache2::Const -compile => qw(OK MODE_GETLINE);
use APR::Const -compile => qw(SO_NONBLOCK EOF SUCCESS);
use APR::Error ();
use APR::Brigade ();
use APR::Bucket ();
use APR::Socket ();
-use Apache::Filter ();
+use Apache2::Filter ();
use ModPerl::Util ();
# use Apache::TieBucketBrigade;
our $VERSION = '0.02';
sub handler {
- my Apache::Connection $c = shift;
- $c->client_socket->opt_set(APR::SO_NONBLOCK => 0);
+ my Apache2::Connection $c = shift;
+ $c->client_socket->opt_set(APR::Const::SO_NONBLOCK => 0);
my $qpsmtpd = Qpsmtpd::Apache->new();
$qpsmtpd->start_connection(
@@ -35,7 +35,7 @@ sub handler {
$qpsmtpd->run($c);
- return Apache::OK;
+ return Apache2::Const::OK;
}
package Qpsmtpd::Apache;
@@ -109,16 +109,16 @@ sub getline {
my $bb = $self->{bb_in};
while (1) {
- my $rc = $c->input_filters->get_brigade($bb, Apache::MODE_GETLINE);
- return if $rc == APR::EOF;
- die APR::Error::strerror($rc) unless $rc == APR::SUCCESS;
+ my $rc = $c->input_filters->get_brigade($bb, Apache2::Const::MODE_GETLINE);
+ return if $rc == APR::Const::EOF;
+ die APR::Error::strerror($rc) unless $rc == APR::Const::SUCCESS;
my $data = '';
while (!$bb->is_empty) {
my $b = $bb->first;
- $b->remove;
$b->read(my $newdata);
- $data .= $newdata;
+ $b->delete;
+ $data .= $newdata;
return $data if index($data, "\n") >= 0;
}
}