From: Mike Taylor Date: Wed, 27 Sep 2006 12:40:44 +0000 (+0000) Subject: callback() now removes a callback if called with an undefined argument. X-Git-Tag: CPAN-v1.02~54^2~965 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=cd504127198fc48b6b927cd98f460cf3d62c9e98;hp=104d25a7f5300f2996ccd95a9d1f4b75d92f98ce callback() now removes a callback if called with an undefined argument. --- diff --git a/lib/ZOOM/Pod.pm b/lib/ZOOM/Pod.pm index df8e2ad..280f099 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.20 2006-09-27 12:40:44 mike Exp $ package ZOOM::Pod; @@ -205,8 +205,7 @@ sub callback { my($event, $sub) = @_; my $old = $this->{callback}->{$event}; - $this->{callback}->{$event} = $sub - if defined $sub; + $this->{callback}->{$event} = $sub; return $old; }