X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=lib%2FZOOM%2FPod.pm;h=3e2f9ceec2e3c3ba22346e94cad9b718ce7cf3ab;hp=df8e2ad8003767f39256ba3261b0ef326c01edee;hb=daa885a1a02081d685ce88a85936a98e71a4bcce;hpb=52e5eaf7c1a6330e7de23416c55ef3f9698645c5 diff --git a/lib/ZOOM/Pod.pm b/lib/ZOOM/Pod.pm index df8e2ad..3e2f9ce 100644 --- a/lib/ZOOM/Pod.pm +++ b/lib/ZOOM/Pod.pm @@ -1,4 +1,4 @@ -# $Id: Pod.pm,v 1.19 2006-09-26 08:52:21 mike Exp $ +# $Id: Pod.pm,v 1.21 2006-09-27 12:48:20 mike Exp $ package ZOOM::Pod; @@ -205,12 +205,25 @@ sub callback { my($event, $sub) = @_; my $old = $this->{callback}->{$event}; - $this->{callback}->{$event} = $sub - if defined $sub; + $this->{callback}->{$event} = $sub; return $old; } +=head2 remove_callbacks() + + $pod->remove_callbacks(); + +Removes all registed callbacks from the pod. This is useful when the +pod has completed one operation and is about to start the next. + +=cut + +sub remove_callbacks { + my $this = shift(); + $this->{callback} = {}; +} + =head2 search_pqf() $pod->search_pqf("@attr 1=1003 wedel");