From: mike Date: Mon, 19 Dec 2005 17:46:09 +0000 (+0000) Subject: In Connection class, rename scan() to scan_pqf() and scan1() to scan1() X-Git-Tag: cpan_1_22~295 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=68859e27fa593b57bd69b688b24b3d68b045f783;hp=020448731710e235062c5b439e1e0939c56c7b2d;p=ZOOM-Perl-moved-to-github.git In Connection class, rename scan() to scan_pqf() and scan1() to scan1() This is in line with the search()/search_pqf() dichotomy. --- diff --git a/lib/ZOOM.pm b/lib/ZOOM.pm index 4960fdd..eff867d 100644 --- a/lib/ZOOM.pm +++ b/lib/ZOOM.pm @@ -1,4 +1,4 @@ -# $Id: ZOOM.pm,v 1.22 2005-12-19 17:39:47 mike Exp $ +# $Id: ZOOM.pm,v 1.23 2005-12-19 17:46:09 mike Exp $ use strict; use warnings; @@ -396,7 +396,7 @@ sub search_pqf { return _new ZOOM::ResultSet($this, $pqf, $_rs); } -sub scan { +sub scan_pqf { my $this = shift(); my($startterm) = @_; @@ -405,7 +405,7 @@ sub scan { return _new ZOOM::ScanSet($this, $startterm, $_ss); } -sub scan1 { +sub scan { my $this = shift(); my($query) = @_; diff --git a/t/25-scan.t b/t/25-scan.t index c361fc4..f6aa477 100644 --- a/t/25-scan.t +++ b/t/25-scan.t @@ -1,4 +1,4 @@ -# $Id: 25-scan.t,v 1.3 2005-12-19 17:40:04 mike Exp $ +# $Id: 25-scan.t,v 1.4 2005-12-19 17:48:47 mike Exp $ # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 25-scan.t' @@ -93,12 +93,13 @@ sub scan { eval { if ($use_query_for_scan) { my $q = new ZOOM::Query::PQF($startterm); - $ss = $conn->scan1($q); + $ss = $conn->scan($q); } else { - $ss = $conn->scan($startterm); + $ss = $conn->scan_pqf($startterm); } }; ok(!$@, "scan for '$startterm'"); + die $@ if $@; $use_query_for_scan = !$use_query_for_scan; my $n = $ss->size();