r43158 - in /branches/upstream/libpoe-component-client-dns-perl/current: CHANGES DNS.pm META.yml Makefile.PL t/01_resolve.t t/02_tag_args.t t/03_api_3.t t/04_errors.t t/05_api_4.t t/06_hosts.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Fri Aug 28 16:26:40 UTC 2009
Author: jawnsy-guest
Date: Fri Aug 28 16:26:34 2009
New Revision: 43158
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=43158
Log:
[svn-upgrade] Integrating new upstream version, libpoe-component-client-dns-perl (1.050)
Modified:
branches/upstream/libpoe-component-client-dns-perl/current/CHANGES
branches/upstream/libpoe-component-client-dns-perl/current/DNS.pm
branches/upstream/libpoe-component-client-dns-perl/current/META.yml
branches/upstream/libpoe-component-client-dns-perl/current/Makefile.PL
branches/upstream/libpoe-component-client-dns-perl/current/t/01_resolve.t
branches/upstream/libpoe-component-client-dns-perl/current/t/02_tag_args.t
branches/upstream/libpoe-component-client-dns-perl/current/t/03_api_3.t
branches/upstream/libpoe-component-client-dns-perl/current/t/04_errors.t
branches/upstream/libpoe-component-client-dns-perl/current/t/05_api_4.t
branches/upstream/libpoe-component-client-dns-perl/current/t/06_hosts.t
Modified: branches/upstream/libpoe-component-client-dns-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/CHANGES?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/CHANGES (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/CHANGES Fri Aug 28 16:26:34 2009
@@ -1,3 +1,30 @@
+==================================
+2009-08-28T06:48:27.516134Z v1_050
+==================================
+
+ 2009-08-28 06:46:24 (r83) by rcaputo
+ t/02_tag_args.t M; DNS.pm M; t/03_api_3.t M; t/01_resolve.t M;
+ t/04_errors.t M; t/05_api_4.t M; Makefile.PL M; t/06_hosts.t M
+
+ Jonathan Yu found a warning while packaging this distro for Debian.
+ I've applied his patch from rt.cpan.org 48335, and I took his
+ suggestion to start using Test::NoWarnings.
+
+ Philip Gwyn found a strange case where IPv6 localhost was returned as
+ ::1 rather than the long form. Added a check for both forms.
+
+ Bumped the version to 1.050 for release.
+
+ 2009-08-28 06:03:27 (r82) by rcaputo; DNS.pm M
+
+ Fix a POD error (line too long, broken link to RT) reported by
+ Jonathan Yu, ironically in rt.cpan.org ticket 48336. :)
+
+ 2009-08-17 04:36:45 (r81) by rcaputo; DNS.pm M
+
+ Fix a warning for /etc/hosts files that contain blank lines or
+ comments. Suggested by Leonid Rashkovsky in e-mail.
+
=================================
2009-07-28T06:01:31.124742Z v1_04
=================================
Modified: branches/upstream/libpoe-component-client-dns-perl/current/DNS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/DNS.pm?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/DNS.pm (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/DNS.pm Fri Aug 28 16:26:34 2009
@@ -1,4 +1,4 @@
-# $Id: DNS.pm 79 2009-07-28 06:01:07Z rcaputo $
+# $Id: DNS.pm 83 2009-08-28 06:46:24Z rcaputo $
# License and documentation are after __END__.
# vim: ts=2 sw=2 expandtab
@@ -7,7 +7,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '1.04';
+$VERSION = '1.050';
use Carp qw(croak);
@@ -507,10 +507,14 @@
my %cached_hosts;
while (<HOST>) {
- next if /^\s*\#/;
- s/^\s*//;
+ next if /^\s*\#/; # skip all-comment lines
+ next if /^\s*$/; # skip empty lines
chomp;
+
+ # Bare split discards leading and trailing whitespace.
my ($address, @aliases) = split;
+ next unless defined $address;
+
my $type = ($address =~ /:/) ? "AAAA" : "A";
foreach my $alias (@aliases) {
$cached_hosts{$alias}{$type}{$address} = 1;
@@ -765,7 +769,7 @@
=head1 BUG TRACKER
-https://rt.cpan.org/Dist/Display.html?Status=Active&Queue=POE-Component-Client-DNS
+https://rt.cpan.org/Dist/Display.html?Queue=POE-Component-Client-DNS
=head1 REPOSITORY
Modified: branches/upstream/libpoe-component-client-dns-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/META.yml?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/META.yml (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/META.yml Fri Aug 28 16:26:34 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: POE-Component-Client-DNS
-version: 1.04
+version: 1.050
abstract: Non-blocking/concurrent DNS queries using Net::DNS and POE
author:
- Rocco Caputo <rcaputo at cpan.org>
@@ -11,9 +11,10 @@
build_requires:
ExtUtils::MakeMaker: 0
requires:
- Net::DNS: 0.59
- POE: 1.007
- Test::More: 0
+ Net::DNS: 0.59
+ POE: 1.007
+ Test::More: 0
+ Test::NoWarnings: 0.084
resources:
license: http://dev.perl.org/licenses/
repository: http://thirdlobe.com/svn/poco-client-dns/trunk
Modified: branches/upstream/libpoe-component-client-dns-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/Makefile.PL?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/Makefile.PL (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/Makefile.PL Fri Aug 28 16:26:34 2009
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $Id: Makefile.PL 79 2009-07-28 06:01:07Z rcaputo $
+# $Id: Makefile.PL 83 2009-08-28 06:46:24Z rcaputo $
use ExtUtils::MakeMaker;
@@ -14,9 +14,10 @@
VERSION_FROM => 'DNS.pm',
PM => { 'DNS.pm' => '$(INST_LIBDIR)/DNS.pm' },
PREREQ_PM => {
- 'POE' => 1.007,
- 'Net::DNS' => 0.59,
- 'Test::More' => 0,
+ 'POE' => 1.007,
+ 'Net::DNS' => 0.59,
+ 'Test::More' => 0,
+ 'Test::NoWarnings' => 0.084,
},
META_ADD => {
resources => {
Modified: branches/upstream/libpoe-component-client-dns-perl/current/t/01_resolve.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/t/01_resolve.t?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/t/01_resolve.t (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/t/01_resolve.t Fri Aug 28 16:26:34 2009
@@ -1,14 +1,13 @@
#!/usr/bin/perl -w
-# $Id: 01_resolve.t 28 2003-11-22 05:33:01Z rcaputo $
+# $Id: 01_resolve.t 83 2009-08-28 06:46:24Z rcaputo $
use strict;
use lib '/home/troc/perl/poe';
sub POE::Kernel::ASSERT_DEFAULT () { 1 }
use POE qw(Component::Client::DNS);
-
-$| = 1;
-print "1..3\n";
+use Test::More tests => 4;
+use Test::NoWarnings;
sub DNS_TIMEOUT () { 3 };
sub DEBUG () { 0 };
@@ -144,26 +143,26 @@
warn "other records: $heap->{other_records}\n";
}
- print 'not '
- unless (
- $heap->{answers} + $heap->{no_answers} +
- $heap->{timeouts} + $heap->{errors} ==
- @hostnames
- );
- print "ok 1\n";
+ is(
+ $heap->{answers} + $heap->{no_answers} +
+ $heap->{timeouts} + $heap->{errors},
+ scalar(@hostnames),
+ "expected number of outcomes"
+ );
- print 'not '
- if (
- $heap->{a_records} + $heap->{mx_records} +
- $heap->{cname_records} + $heap->{other_records} <
- $heap->{answers}
- );
- print "ok 2\n";
+ ok(
+ $heap->{a_records} + $heap->{mx_records}
+ + $heap->{cname_records} + $heap->{other_records}
+ >= $heap->{answers},
+ "got enough records"
+ );
# Cut some slack for people running on really really slow systems.
- print 'not '
- unless (time() - $heap->{start_time}) < ((DNS_TIMEOUT * @hostnames) / 2);
- print "ok 3\n";
+
+ ok(
+ time() - $heap->{start_time} < (DNS_TIMEOUT * @hostnames) / 2,
+ "tests ran sufficiently quickly"
+ );
DEBUG and warn "client stopped...\n";
}
Modified: branches/upstream/libpoe-component-client-dns-perl/current/t/02_tag_args.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/t/02_tag_args.t?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/t/02_tag_args.t (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/t/02_tag_args.t Fri Aug 28 16:26:34 2009
@@ -5,7 +5,8 @@
use POE qw(Component::Client::DNS);
use Data::Dumper;
-print "1..4\n";
+use Test::More tests => 5;
+use Test::NoWarnings;
my $reverse = "127.0.0.1";
@@ -14,16 +15,13 @@
Timeout => 5,
);
-my @tests = ("not ") x 4;
-my $test_number = 0;
-
POE::Session->create(
inline_states => {
_start => sub {
for (1..4) {
$_[KERNEL]->post(
named => resolve =>
- [ reverse => "TEST WORKED", $test_number++ ] =>
+ [ reverse => "TEST WORKED" ] =>
$reverse, 'PTR'
);
}
@@ -32,17 +30,11 @@
_stop => sub { }, # for asserts
reverse => sub {
- if ($_[ARG0][3] eq "TEST WORKED") {
- $tests[$_[ARG0][4]] = "";
- }
+ is( $_[ARG0][3], "TEST WORKED", "test worked" );
},
}
);
POE::Kernel->run;
-for (1.. at tests) {
- print shift(@tests), "ok $_\n";
-}
-
exit 0;
Modified: branches/upstream/libpoe-component-client-dns-perl/current/t/03_api_3.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/t/03_api_3.t?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/t/03_api_3.t (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/t/03_api_3.t Fri Aug 28 16:26:34 2009
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id: 03_api_3.t 56 2006-05-21 20:43:08Z rcaputo $
+# $Id: 03_api_3.t 83 2009-08-28 06:46:24Z rcaputo $
# vim: filetype=perl
# Test the version 3 API.
@@ -7,7 +7,8 @@
use strict;
sub POE::Kernel::ASSERT_DEFAULT () { 1 }
use POE qw(Component::Client::DNS);
-use Test::More tests => 4;
+use Test::More tests => 5;
+use Test::NoWarnings;
POE::Component::Client::DNS->spawn(
Alias => 'named',
Modified: branches/upstream/libpoe-component-client-dns-perl/current/t/04_errors.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/t/04_errors.t?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/t/04_errors.t (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/t/04_errors.t Fri Aug 28 16:26:34 2009
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id: 04_errors.t 73 2009-02-18 04:48:06Z rcaputo $
+# $Id: 04_errors.t 83 2009-08-28 06:46:24Z rcaputo $
# vim: filetype=perl
# Deliberately trigger errors.
@@ -9,7 +9,8 @@
sub POE::Kernel::CATCH_EXCEPTIONS () { 0 }
use POE qw(Component::Client::DNS);
-use Test::More tests => 9;
+use Test::More tests => 10;
+use Test::NoWarnings;
# Avoid a warning.
POE::Kernel->run();
Modified: branches/upstream/libpoe-component-client-dns-perl/current/t/05_api_4.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/t/05_api_4.t?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/t/05_api_4.t (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/t/05_api_4.t Fri Aug 28 16:26:34 2009
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id: 05_api_4.t 56 2006-05-21 20:43:08Z rcaputo $
+# $Id: 05_api_4.t 83 2009-08-28 06:46:24Z rcaputo $
# vim: filetype=perl
# Test the version 3 API.
@@ -7,7 +7,8 @@
use strict;
sub POE::Kernel::ASSERT_DEFAULT () { 1 }
use POE qw(Component::Client::DNS);
-use Test::More tests => 4;
+use Test::More tests => 5;
+use Test::NoWarnings;
my $resolver = POE::Component::Client::DNS->spawn(
Alias => 'named',
Modified: branches/upstream/libpoe-component-client-dns-perl/current/t/06_hosts.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-dns-perl/current/t/06_hosts.t?rev=43158&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-dns-perl/current/t/06_hosts.t (original)
+++ branches/upstream/libpoe-component-client-dns-perl/current/t/06_hosts.t Fri Aug 28 16:26:34 2009
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $Id: 06_hosts.t 77 2009-07-26 06:30:34Z rcaputo $
+# $Id: 06_hosts.t 83 2009-08-28 06:46:24Z rcaputo $
# vim: filetype=perl
# Test the hosts file stuff.
@@ -8,7 +8,8 @@
use strict;
sub POE::Kernel::ASSERT_DEFAULT () { 1 }
use POE qw(Component::Client::DNS);
-use Test::More tests => 4;
+use Test::More tests => 5;
+use Test::NoWarnings;
require Net::DNS;
my $can_resolve = Net::DNS::Resolver->new->search("poe.perl.org");
@@ -100,7 +101,7 @@
my $response = $_[ARG0];
my $address = aaaa_data($response);
ok(
- $address eq "0:0:0:0:0:0:0:1",
+ ($address eq "0:0:0:0:0:0:0:1" or $address eq "::1"),
"ipv6 lookup when hosts file matches ($address)"
);
More information about the Pkg-perl-cvs-commits
mailing list