From fab1e1617563039256b9a06d23b92155e6af8d15 Mon Sep 17 00:00:00 2001 From: mike Date: Fri, 7 Apr 2006 11:05:14 +0000 Subject: [PATCH] Add asynchronous support: ZOOM:event() ZOOM::event_str() ZOOM::Connection::last_event() Still to be documented in ZOOM.pod --- lib/ZOOM.pm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM.pm b/lib/ZOOM.pm index 0b13a2b..8ca0ad9 100644 --- a/lib/ZOOM.pm +++ b/lib/ZOOM.pm @@ -1,4 +1,4 @@ -# $Id: ZOOM.pm,v 1.28 2006-04-03 14:00:00 mike Exp $ +# $Id: ZOOM.pm,v 1.29 2006-04-07 11:05:14 mike Exp $ use strict; use warnings; @@ -93,6 +93,19 @@ sub diag_str { return Net::Z3950::ZOOM::diag_str($code); } +### Undocumented +sub event_str { + return Net::Z3950::ZOOM::event_str(@_); +} + +### Undocumented +sub event { + my($connsref) = @_; + + my @_connsref = map { $_->_conn() } @$connsref; + return Net::Z3950::ZOOM::event(\@_connsref); +} + sub _oops { my($code, $addinfo, $diagset) = @_; @@ -296,7 +309,7 @@ sub new { return $conn; } -# PRIVATE to this class and to ZOOM::Query::CQL2RPN::new() +# PRIVATE to this class, to ZOOM::event() and to ZOOM::Query::CQL2RPN::new() sub _conn { my $this = shift(); @@ -443,6 +456,13 @@ sub package { return _new ZOOM::Package($this, $options, $_p); } +### Undocumented +sub last_event { + my $this = shift(); + + return Net::Z3950::ZOOM::connection_last_event($this->_conn()); +} + sub destroy { my $this = shift(); -- 1.7.10.4