r26105 - in /branches/upstream/libnet-z3950-zoom-perl/current: Changes MANIFEST META.yml Makefile.PL lib/Net/Z3950/ZOOM.pm samples/zoom/zdump.pl samples/zoom/zoomdump t/16-packages.t t/26-packages.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Oct 17 20:49:31 UTC 2008
Author: gregoa
Date: Fri Oct 17 20:49:28 2008
New Revision: 26105
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=26105
Log:
[svn-upgrade] Integrating new upstream version, libnet-z3950-zoom-perl (1.25)
Added:
branches/upstream/libnet-z3950-zoom-perl/current/samples/zoom/zoomdump (with props)
Removed:
branches/upstream/libnet-z3950-zoom-perl/current/samples/zoom/zdump.pl
Modified:
branches/upstream/libnet-z3950-zoom-perl/current/Changes
branches/upstream/libnet-z3950-zoom-perl/current/MANIFEST
branches/upstream/libnet-z3950-zoom-perl/current/META.yml
branches/upstream/libnet-z3950-zoom-perl/current/Makefile.PL
branches/upstream/libnet-z3950-zoom-perl/current/lib/Net/Z3950/ZOOM.pm
branches/upstream/libnet-z3950-zoom-perl/current/t/16-packages.t
branches/upstream/libnet-z3950-zoom-perl/current/t/26-packages.t
Modified: branches/upstream/libnet-z3950-zoom-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-z3950-zoom-perl/current/Changes?rev=26105&op=diff
==============================================================================
--- branches/upstream/libnet-z3950-zoom-perl/current/Changes (original)
+++ branches/upstream/libnet-z3950-zoom-perl/current/Changes Fri Oct 17 20:49:28 2008
@@ -1,6 +1,14 @@
-$Id: Changes,v 1.80 2008-06-17 10:32:03 mike Exp $
+$Id: Changes,v 1.82 2008-09-29 16:23:18 mike Exp $
Revision history for Perl extension Net::Z3950::ZOOM.
+
+1.25 [IN PROGRESS]
+ - Fix test-suite not to run the "packages" tests against
+ test.indexdata.com, which has gone away, but against
+ z3950.indexdata.com, like the other tests. A new server
+ runs on a different port for these tests.
+ - Rename zdump.pl to zoomdump, and add it to the set of
+ programs installed.
1.24 Tue Jun 17 11:31:08 BST 2008
- When Net::Z3950::ZOOM::record_get() fetches an XML record
Modified: branches/upstream/libnet-z3950-zoom-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-z3950-zoom-perl/current/MANIFEST?rev=26105&op=diff
==============================================================================
--- branches/upstream/libnet-z3950-zoom-perl/current/MANIFEST (original)
+++ branches/upstream/libnet-z3950-zoom-perl/current/MANIFEST Fri Oct 17 20:49:28 2008
@@ -1,4 +1,4 @@
-# $Id: MANIFEST,v 1.34 2007/08/16 15:40:30 mike Exp $
+# $Id: MANIFEST,v 1.35 2008-09-26 12:02:19 mike Exp $
Changes
Makefile.PL
@@ -45,7 +45,7 @@
samples/zoom/async.pl
samples/zoom/trivial-async.pl
samples/zoom/update.pl
-samples/zoom/zdump.pl
+samples/zoom/zoomdump
samples/zoom/zhello.pl
samples/zoom/zoomscan.pl
samples/zoom/zoomtst1.pl
Modified: branches/upstream/libnet-z3950-zoom-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-z3950-zoom-perl/current/META.yml?rev=26105&op=diff
==============================================================================
--- branches/upstream/libnet-z3950-zoom-perl/current/META.yml (original)
+++ branches/upstream/libnet-z3950-zoom-perl/current/META.yml Fri Oct 17 20:49:28 2008
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Net-Z3950-ZOOM
-version: 1.24
+version: 1.25
version_from: lib/Net/Z3950/ZOOM.pm
installdirs: site
requires:
Modified: branches/upstream/libnet-z3950-zoom-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-z3950-zoom-perl/current/Makefile.PL?rev=26105&op=diff
==============================================================================
--- branches/upstream/libnet-z3950-zoom-perl/current/Makefile.PL (original)
+++ branches/upstream/libnet-z3950-zoom-perl/current/Makefile.PL Fri Oct 17 20:49:28 2008
@@ -1,4 +1,4 @@
-# $Id: Makefile.PL,v 1.26 2007-11-29 16:43:52 mike Exp $
+# $Id: Makefile.PL,v 1.27 2008-09-16 12:44:28 mike Exp $
# Use: perl Makefile.PL OPTIMIZE="-O0 -g -Wdeclaration-after-statement"
# or: perl Makefile.PL PREFIX=/home/mike/universe
@@ -42,7 +42,7 @@
# OBJECT => '$(O_FILES)', # link all the C files too
# Use this to test for illegal code that GCC stupidly permits by default:
# OPTIMIZE => "-Wdeclaration-after-statement -g -O0",
- EXE_FILES => [ 'samples/zoom/zselect' ],
+ EXE_FILES => [ 'samples/zoom/zselect', 'samples/zoom/zoomdump' ],
);
Modified: branches/upstream/libnet-z3950-zoom-perl/current/lib/Net/Z3950/ZOOM.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-z3950-zoom-perl/current/lib/Net/Z3950/ZOOM.pm?rev=26105&op=diff
==============================================================================
--- branches/upstream/libnet-z3950-zoom-perl/current/lib/Net/Z3950/ZOOM.pm (original)
+++ branches/upstream/libnet-z3950-zoom-perl/current/lib/Net/Z3950/ZOOM.pm Fri Oct 17 20:49:28 2008
@@ -1,4 +1,4 @@
-# $Id: ZOOM.pm,v 1.41 2008-06-17 10:30:52 mike Exp $
+# $Id: ZOOM.pm,v 1.42 2008-09-29 16:22:25 mike Exp $
package Net::Z3950::ZOOM;
@@ -6,7 +6,7 @@
use strict;
use warnings;
-our $VERSION = '1.24';
+our $VERSION = '1.25';
require XSLoader;
XSLoader::load('Net::Z3950::ZOOM', $VERSION);
Added: branches/upstream/libnet-z3950-zoom-perl/current/samples/zoom/zoomdump
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-z3950-zoom-perl/current/samples/zoom/zoomdump?rev=26105&op=file
==============================================================================
--- branches/upstream/libnet-z3950-zoom-perl/current/samples/zoom/zoomdump (added)
+++ branches/upstream/libnet-z3950-zoom-perl/current/samples/zoom/zoomdump Fri Oct 17 20:49:28 2008
@@ -1,0 +1,33 @@
+#!/usr/bin/perl -w
+
+# $Id: zoomdump,v 1.2 2007-03-07 11:34:26 mike Exp $
+#
+# Dumps the contents of the nominated Zebra database to a set of
+# separate XML files with numeric names.
+
+use strict;
+use warnings;
+use ZOOM;
+
+if (@ARGV != 1) {
+ print STDERR "Usage: $0 target\n";
+ exit 1;
+}
+
+my $conn = new ZOOM::Connection($ARGV[0]);
+$conn->option(preferredRecordSyntax => "xml");
+$conn->option(elementSetName => "zebra::data");
+my $rs = $conn->search_pqf('@attr 1=_ALLRECORDS @attr 2=103 ""');
+my $n = $rs->size();
+$| = 1;
+print "$0: dumping $n records\n";
+foreach my $i (1..$n) {
+ print ".";
+ print " $i/$n (", int($i*100/$n), "%)\n" if $i % 50 == 0;
+ my $rec = $rs->record($i-1);
+ my $xml = $rec->render();
+ open F, ">$i.xml" or die "can't open\n";
+ print F $xml;
+ close F;
+}
+print " $n/$n (100%)\n" if $n % 50 != 0;
Propchange: branches/upstream/libnet-z3950-zoom-perl/current/samples/zoom/zoomdump
------------------------------------------------------------------------------
svn:executable = *
Modified: branches/upstream/libnet-z3950-zoom-perl/current/t/16-packages.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-z3950-zoom-perl/current/t/16-packages.t?rev=26105&op=diff
==============================================================================
--- branches/upstream/libnet-z3950-zoom-perl/current/t/16-packages.t (original)
+++ branches/upstream/libnet-z3950-zoom-perl/current/t/16-packages.t Fri Oct 17 20:49:28 2008
@@ -1,4 +1,4 @@
-# $Id: 16-packages.t,v 1.12 2006/04/12 12:30:09 mike Exp $
+# $Id: 16-packages.t,v 1.14 2008-09-29 15:49:13 mike Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 16-packages.t'
@@ -14,13 +14,13 @@
use strict;
use warnings;
-use Test::More tests => 40;
+use Test::More tests => 39;
BEGIN { use_ok('Net::Z3950::ZOOM') };
# We will create, and destroy, a new database with a random name
-my $host = "test.indexdata.com:2118";
+my $host = "z3950.indexdata.com:2100";
my $dbname = join("", map { chr(ord("a") + int(rand(26))) } 1..10);
# Connect anonymously, and expect this to fail
@@ -41,32 +41,32 @@
Net::Z3950::ZOOM::connection_destroy($conn);
$conn = makeconn($host, "admin", "fish", 0);
Net::Z3950::ZOOM::connection_option_set($conn, databaseName => $dbname);
-count_hits($conn, "the", 109);
+count_hits($conn, $dbname, "the", 109);
# Now create the database and check that it is present but empty
makedb($conn, $dbname, 0);
-count_hits($conn, "the", 0, 0);
+count_hits($conn, $dbname, "the", 114);
# Trying to create the same database again will fail EEXIST
makedb($conn, $dbname, 224);
# Add a single record, and check that it can be found
updaterec($conn, 1, content_of("samples/records/esdd0006.grs"), 0);
-count_hits($conn, "the", 0, 1);
+count_hits($conn, $dbname, "the", 0, 1);
# Add the same record with the same ID: overwrite => no change
updaterec($conn, 1, content_of("samples/records/esdd0006.grs"), 0);
-count_hits($conn, "the", 0, 1);
+count_hits($conn, $dbname, "the", 0, 1);
# Add it again record with different ID => new copy added
updaterec($conn, 2, content_of("samples/records/esdd0006.grs"), 0);
-count_hits($conn, "the", 0, 2);
+count_hits($conn, $dbname, "the", 0, 2);
# Now drop the newly-created database
dropdb($conn, $dbname, 0);
# A second dropping should fail, as the database is no longer there.
-dropdb($conn, $dbname, 10004);
+dropdb($conn, $dbname, 235);
sub makeconn {
@@ -134,7 +134,8 @@
my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy");
$errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo);
ok($errcode == $expected_error,
- "database drop '$dbname'" . ($errcode ? " refused $errcode" : ""));
+ ("database drop '$dbname'" . ($errcode ? " refused $errcode" : "") .
+ ($expected_error ? " expected $expected_error but succeeded" : "")));
Net::Z3950::ZOOM::package_destroy($p);
ok(1, "destroyed dropdb package");
@@ -166,7 +167,7 @@
sub count_hits {
- my($conn, $query, $expected_error, $expected_count) = @_;
+ my($conn, $dbname, $query, $expected_error, $expected_count) = @_;
my $rs = Net::Z3950::ZOOM::connection_search_pqf($conn, $query);
my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy");
Modified: branches/upstream/libnet-z3950-zoom-perl/current/t/26-packages.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-z3950-zoom-perl/current/t/26-packages.t?rev=26105&op=diff
==============================================================================
--- branches/upstream/libnet-z3950-zoom-perl/current/t/26-packages.t (original)
+++ branches/upstream/libnet-z3950-zoom-perl/current/t/26-packages.t Fri Oct 17 20:49:28 2008
@@ -1,17 +1,17 @@
-# $Id: 26-packages.t,v 1.8 2006/06/07 09:58:56 mike Exp $
+# $Id: 26-packages.t,v 1.9 2008-09-29 15:49:18 mike Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 26-packages.t'
use strict;
use warnings;
-use Test::More tests => 40;
+use Test::More tests => 39;
BEGIN { use_ok('ZOOM') };
# We will create, and destroy, a new database with a random name
-my $host = "test.indexdata.com:2118";
+my $host = "z3950.indexdata.com:2100";
my $dbname = join("", map { chr(ord("a") + int(rand(26))) } 1..10);
# Connect anonymously, and expect this to fail
@@ -32,32 +32,32 @@
$conn->destroy();
$conn = makeconn($host, "admin", "fish", 0);
$conn->option(databaseName => $dbname);
-count_hits($conn, "the", 109);
+count_hits($conn, $dbname, "the", 109);
# Now create the database and check that it is present but empty
makedb($conn, $dbname, 0);
-count_hits($conn, "the", 0, 0);
+count_hits($conn, $dbname, "the", 114);
# Trying to create the same database again will fail EEXIST
makedb($conn, $dbname, 224);
# Add a single record, and check that it can be found
updaterec($conn, 1, content_of("samples/records/esdd0006.grs"), 0);
-count_hits($conn, "the", 0, 1);
+count_hits($conn, $dbname, "the", 0, 1);
# Add the same record with the same ID: overwrite => no change
updaterec($conn, 1, content_of("samples/records/esdd0006.grs"), 0);
-count_hits($conn, "the", 0, 1);
+count_hits($conn, $dbname, "the", 0, 1);
# Add it again record with different ID => new copy added
updaterec($conn, 2, content_of("samples/records/esdd0006.grs"), 0);
-count_hits($conn, "the", 0, 2);
+count_hits($conn, $dbname, "the", 0, 2);
# Now drop the newly-created database
dropdb($conn, $dbname, 0);
# A second dropping should fail, as the database is no longer there.
-dropdb($conn, $dbname, 10004);
+dropdb($conn, $dbname, 235);
sub makeconn {
@@ -151,7 +151,7 @@
sub count_hits {
- my($conn, $query, $expected_error, $expected_count) = @_;
+ my($conn, $dbname, $query, $expected_error, $expected_count) = @_;
my $rs;
eval { $rs = $conn->search_pqf($query) };
More information about the Pkg-perl-cvs-commits
mailing list