X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM.pm;h=6b2f8c985b12b9c64addf7531872b3324412e1f3;hb=87c72eaf97a3dbf51a93dab782c2909539addc48;hp=5783adb96a8f8f100662808b3a7874e196d42cca;hpb=c56880e12ff3cd92b803c1ecf1dba6885dba21b7;p=ZOOM-Perl-moved-to-github.git diff --git a/lib/ZOOM.pm b/lib/ZOOM.pm index 5783adb..6b2f8c9 100644 --- a/lib/ZOOM.pm +++ b/lib/ZOOM.pm @@ -1,5 +1,3 @@ -# $Id: ZOOM.pm,v 1.49 2007-09-14 10:34:35 mike Exp $ - use strict; use warnings; use IO::File; @@ -580,6 +578,14 @@ sub sortby { or ZOOM::_oops(ZOOM::Error::SORTBY, $sortby); } +sub sortby2 { + my $this = shift(); + my($strategy, $sortby) = @_; + + Net::Z3950::ZOOM::query_sortby2($this->_query(), $strategy, $sortby) == 0 + or ZOOM::_oops(ZOOM::Error::SORTBY, $sortby); +} + sub destroy { my $this = shift(); @@ -898,14 +904,7 @@ sub get { my($type, $args) = @_; $type = "$type;$args" if defined $args; - my $len = 0; - my $string = Net::Z3950::ZOOM::record_get($this->_rec(), $type, $len); - # I don't think we need '$len' at all. ### Probably the Perl-to-C - # glue code should use the value of `len' as well as the opaque - # data-pointer returned, to ensure that the SV contains all of the - # returned data and does not stop at the first NUL character in - # binary data. Carefully check the ZOOM_record_get() documentation. - return $string; + return Net::Z3950::ZOOM::record_get($this->_rec(), $type); } sub clone {