r30996 - in /trunk/libpoe-component-client-dns-perl: CHANGES DNS.pm META.yml debian/changelog debian/control t/04_errors.t
antonio-guest at users.alioth.debian.org
antonio-guest at users.alioth.debian.org
Sat Feb 21 22:54:03 UTC 2009
Author: antonio-guest
Date: Sat Feb 21 22:54:00 2009
New Revision: 30996
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=30996
Log:
last commit for the upgrade
Modified:
trunk/libpoe-component-client-dns-perl/CHANGES
trunk/libpoe-component-client-dns-perl/DNS.pm
trunk/libpoe-component-client-dns-perl/META.yml
trunk/libpoe-component-client-dns-perl/debian/changelog
trunk/libpoe-component-client-dns-perl/debian/control
trunk/libpoe-component-client-dns-perl/t/04_errors.t
Modified: trunk/libpoe-component-client-dns-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-dns-perl/CHANGES?rev=30996&op=diff
==============================================================================
--- trunk/libpoe-component-client-dns-perl/CHANGES (original)
+++ trunk/libpoe-component-client-dns-perl/CHANGES Sat Feb 21 22:54:00 2009
@@ -1,3 +1,18 @@
+=================================
+2009-02-18T04:48:37.232115Z v1_03
+=================================
+
+ 2009-02-18 04:48:06 (r73) by rcaputo; DNS.pm M; t/04_errors.t M
+
+ Fix warnings uncovered by POE's recent global-warning issue.
+
+ 2009-02-02 07:50:33 (r72) by hachi; DNS.pm M
+
+ Make it safe to have more than one PoCoDNS object.
+
+ Somehow this bug has been no problem for people this entire time. An
+ amazing trick really :D
+
=================================
2009-01-13T20:18:27.751944Z v1_02
=================================
Modified: trunk/libpoe-component-client-dns-perl/DNS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-dns-perl/DNS.pm?rev=30996&op=diff
==============================================================================
--- trunk/libpoe-component-client-dns-perl/DNS.pm (original)
+++ trunk/libpoe-component-client-dns-perl/DNS.pm Sat Feb 21 22:54:00 2009
@@ -1,4 +1,4 @@
-# $Id: DNS.pm 70 2009-01-13 20:08:27Z rcaputo $
+# $Id: DNS.pm 73 2009-02-18 04:48:06Z rcaputo $
# License and documentation are after __END__.
package POE::Component::Client::DNS;
@@ -6,7 +6,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '1.02';
+$VERSION = '1.03';
use Carp qw(croak);
@@ -15,11 +15,6 @@
use POE;
use constant DEBUG => 0;
-
-# Keep track of requests for each response socket. Used to pass data
-# around select_read().
-
-my %req_by_socket;
# A hosts file we found somewhere.
@@ -38,6 +33,7 @@
sub SF_HOSTS_CACHE () { 8 }
sub SF_HOSTS_BYTES () { 9 }
sub SF_SHUTDOWN () { 10 }
+sub SF_REQ_BY_SOCK () { 11 }
# Spawn a new PoCo::Client::DNS session. This basically is a
# constructor, but it isn't named "new" because it doesn't create a
@@ -286,7 +282,7 @@
# Set a timeout for the request, and watch the response socket for
# activity.
- $req_by_socket{$resolver_socket} = $req;
+ $self->[SF_REQ_BY_SOCK]->{$resolver_socket} = $req;
$kernel->delay($resolver_socket, $remaining, $resolver_socket);
$kernel->select_read($resolver_socket, 'got_dns_response');
@@ -298,12 +294,12 @@
# A resolver query timed out. Post an error back.
sub _dns_default {
- my ($kernel, $event, $args) = @_[KERNEL, ARG0, ARG1];
+ my ($self, $kernel, $event, $args) = @_[OBJECT, KERNEL, ARG0, ARG1];
my $socket = $args->[0];
return unless defined($socket) and $event eq $socket;
- my $req = delete $req_by_socket{$socket};
+ my $req = delete $self->[SF_REQ_BY_SOCK]->{$socket};
return unless $req;
# Stop watching the socket.
@@ -325,7 +321,7 @@
sub _dns_response {
my ($self, $kernel, $socket) = @_[OBJECT, KERNEL, ARG0];
- my $req = delete $req_by_socket{$socket};
+ my $req = delete $self->[SF_REQ_BY_SOCK]->{$socket};
return unless $req;
# Turn off the timeout for this request, and stop watching the
@@ -361,9 +357,9 @@
my ($self, $kernel) = @_[OBJECT, KERNEL];
# Clean up all pending socket timeouts and selects.
- foreach my $socket (keys %req_by_socket) {
+ foreach my $socket (keys %{$self->[SF_REQ_BY_SOCK]}) {
DEBUG and warn "SHT: Shutting down resolver socket $socket";
- my $req = delete $req_by_socket{$socket};
+ my $req = delete $self->[SF_REQ_BY_SOCK]->{$socket};
$kernel->delay($socket);
$kernel->select($req->{resolver_socket});
@@ -478,10 +474,10 @@
# Reload the hosts file if times have changed.
my ($inode, $bytes, $mtime, $ctime) = (stat $use_hosts_file)[1, 7, 9,10];
unless (
- $self->[SF_HOSTS_MTIME] == $mtime and
- $self->[SF_HOSTS_CTIME] == $ctime and
- $self->[SF_HOSTS_INODE] == $inode and
- $self->[SF_HOSTS_BYTES] == $bytes
+ $self->[SF_HOSTS_MTIME] == ($mtime || -1) and
+ $self->[SF_HOSTS_CTIME] == ($ctime || -1) and
+ $self->[SF_HOSTS_INODE] == ($inode || -1) and
+ $self->[SF_HOSTS_BYTES] == ($bytes || -1)
) {
return unless open(HOST, "<", $use_hosts_file);
Modified: trunk/libpoe-component-client-dns-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-dns-perl/META.yml?rev=30996&op=diff
==============================================================================
--- trunk/libpoe-component-client-dns-perl/META.yml (original)
+++ trunk/libpoe-component-client-dns-perl/META.yml Sat Feb 21 22:54:00 2009
@@ -1,22 +1,16 @@
--- #YAML:1.0
-name: POE-Component-Client-DNS
-version: 1.02
-abstract: Non-blocking/concurrent DNS queries using Net::DNS and POE
-author:
+name: POE-Component-Client-DNS
+version: 1.03
+abstract: Non-blocking/concurrent DNS queries using Net::DNS and POE
+license: perl
+author:
- Rocco Caputo <rcaputo at cpan.org>
-license: perl
-distribution_type: module
-configure_requires:
- ExtUtils::MakeMaker: 0
-requires:
- Net::DNS: 0.59
- POE: 0.31
- Test::More: 0
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.48
+generated_by: ExtUtils::MakeMaker version 6.42
+distribution_type: module
+requires:
+ Net::DNS: 0.59
+ POE: 0.31
+ Test::More: 0
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
Modified: trunk/libpoe-component-client-dns-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-dns-perl/debian/changelog?rev=30996&op=diff
==============================================================================
--- trunk/libpoe-component-client-dns-perl/debian/changelog (original)
+++ trunk/libpoe-component-client-dns-perl/debian/changelog Sat Feb 21 22:54:00 2009
@@ -1,3 +1,11 @@
+libpoe-component-client-dns-perl (1:1.03-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * debian/control:
+ + added myself to the Uploaders
+
+ -- Antonio Radici <antonio at dyne.org> Sat, 21 Feb 2009 22:51:28 +0000
+
libpoe-component-client-dns-perl (1:1.02-1) unstable; urgency=low
* New upstream release.
Modified: trunk/libpoe-component-client-dns-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-dns-perl/debian/control?rev=30996&op=diff
==============================================================================
--- trunk/libpoe-component-client-dns-perl/debian/control (original)
+++ trunk/libpoe-component-client-dns-perl/debian/control Sat Feb 21 22:54:00 2009
@@ -7,7 +7,7 @@
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: MartÃn Ferrari <tincho at debian.org>,
Jose Luis Rivas <ghostbar38 at gmail.com>, Rene Mayorga <rmayorga at debian.org.sv>,
- gregor herrmann <gregoa at debian.org>
+ gregor herrmann <gregoa at debian.org>, Antonio Radici <antonio at dyne.org>
Standards-Version: 3.8.0
Homepage: http://search.cpan.org/dist/POE-Component-Client-DNS/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libpoe-component-client-dns-perl/
Modified: trunk/libpoe-component-client-dns-perl/t/04_errors.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-dns-perl/t/04_errors.t?rev=30996&op=diff
==============================================================================
--- trunk/libpoe-component-client-dns-perl/t/04_errors.t (original)
+++ trunk/libpoe-component-client-dns-perl/t/04_errors.t Sat Feb 21 22:54:00 2009
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id: 04_errors.t 53 2005-12-05 18:34:05Z rcaputo $
+# $Id: 04_errors.t 73 2009-02-18 04:48:06Z rcaputo $
# vim: filetype=perl
# Deliberately trigger errors.
@@ -17,7 +17,7 @@
{
eval { POE::Component::Client::DNS->spawn(1); };
my $err = $@;
- $err =~ s/ at \S+ line \d+.*//s;
+ $err =~ s/ at \S+ line \d+.*//s;
is(
$err, "POE::Component::Client::DNS requires an even number of parameters"
);
@@ -26,7 +26,7 @@
{
eval { POE::Component::Client::DNS->spawn(moo => "nope"); };
my $err = $@;
- $err =~ s/ at \S+ line \d+.*//s;
+ $err =~ s/ at \S+ line \d+.*//s;
is(
$err, "POE::Component::Client::DNS doesn't know these parameters: moo"
);
@@ -42,8 +42,7 @@
);
};
my $err = $@;
- my $err = $@;
- $err =~ s/ at \S+ line \d+.*//s;
+ $err =~ s/ at \S+ line \d+.*//s;
is($err, "Must include an 'event' in Client::DNS request");
}
@@ -56,7 +55,7 @@
);
};
my $err = $@;
- $err =~ s/ at \S+ line \d+.*//s;
+ $err =~ s/ at \S+ line \d+.*//s;
is($err, "Must include a 'context' in Client::DNS request");
}
@@ -70,7 +69,7 @@
);
};
my $err = $@;
- $err =~ s/ at \S+ line \d+.*//s;
+ $err =~ s/ at \S+ line \d+.*//s;
is($err, "Must include a 'host' in Client::DNS request");
}
@@ -79,7 +78,7 @@
$resolver->resolve(1);
};
my $err = $@;
- $err =~ s/ at \S+ line \d+.*//s;
+ $err =~ s/ at \S+ line \d+.*//s;
is($err, "resolve() needs an even number of parameters");
}
@@ -88,7 +87,7 @@
$resolver->resolve();
};
my $err = $@;
- $err =~ s/ at \S+ line \d+.*//s;
+ $err =~ s/ at \S+ line \d+.*//s;
is($err, "resolve() must include an 'event'");
}
@@ -99,7 +98,7 @@
);
};
my $err = $@;
- $err =~ s/ at \S+ line \d+.*//s;
+ $err =~ s/ at \S+ line \d+.*//s;
is($err, "resolve() must include a 'context'");
}
@@ -111,7 +110,7 @@
);
};
my $err = $@;
- $err =~ s/ at \S+ line \d+.*//s;
+ $err =~ s/ at \S+ line \d+.*//s;
is($err, "resolve() must include a 'host'");
}
More information about the Pkg-perl-cvs-commits
mailing list