From: mike Date: Fri, 10 Feb 2006 16:24:19 +0000 (+0000) Subject: Allow single-argument Connection constructor. X-Git-Tag: cpan_1_22~250 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=86c06c14e096899d863f92e3b000a8dc61494d5a;p=ZOOM-Perl-moved-to-github.git Allow single-argument Connection constructor. --- diff --git a/Changes b/Changes index acd6ef9..b3e5e97 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,4 @@ -$Id: Changes,v 1.17 2006-01-31 15:39:05 mike Exp $ +$Id: Changes,v 1.18 2006-02-10 16:24:19 mike Exp $ Revision history for Perl extension Net::Z3950::ZOOM. @@ -8,6 +8,9 @@ Revision history for Perl extension Net::Z3950::ZOOM. 2.0.11 (which is what ZOOM-Perl 1.02 requires) unless the file /tmp/ignore-ZOOM-YAZ-version-mismatch exists. - Fix incorrect ZOOM-package URL in documentation. + - The ZOOM::Connection constructor may now be called with only + a single argument (host-string) and does not require a + dummy port-number argument. 1.01 Thu Dec 22 14:13:34 GMT 2005 - Place some CODE: chunks in "ZOOM.xs" inside curly brackets diff --git a/lib/ZOOM.pm b/lib/ZOOM.pm index e4b2801..27ad75d 100644 --- a/lib/ZOOM.pm +++ b/lib/ZOOM.pm @@ -1,4 +1,4 @@ -# $Id: ZOOM.pm,v 1.25 2005-12-22 12:48:15 mike Exp $ +# $Id: ZOOM.pm,v 1.26 2006-02-10 16:24:34 mike Exp $ use strict; use warnings; @@ -353,6 +353,7 @@ sub connect { my $this = shift(); my($host, $port) = @_; + $port = 0 if !defined $port; Net::Z3950::ZOOM::connection_connect($this->_conn(), $host, $port); $this->_check(); # No return value