callback() now removes a callback if called with an undefined argument.
[irspy-moved-to-github.git] / lib / ZOOM / Pod.pm
index 5c554ec..280f099 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Pod.pm,v 1.18 2006-07-25 16:51:22 mike Exp $
+# $Id: Pod.pm,v 1.20 2006-09-27 12:40:44 mike Exp $
 
 package ZOOM::Pod;
 
@@ -8,7 +8,7 @@ use warnings;
 use ZOOM;
 
 BEGIN {
-    # Just register the name
+    # Just register the names: this doesn't turn the levels on
     ZOOM::Log::mask_str("pod");
     ZOOM::Log::mask_str("pod_unhandled");
 }
@@ -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;
 }