=pod =head1 Zoidberg::Monitor The monitor subsystem can be used for running applets inside the zoid. These applets have the following properties: =over 4 =item B Unique name used to identify the applet =item B The event used to trigger the applet =item B A subroutine which does arbitrary voodoo to decide whether to return true =item B A subroutine that acts when the condition is true (notify user, kill process, turn off lights :) ) =back To get a list of running applets type: C<-EMonitor-Elist> You can register a new applet using the following syntax: C<-EMonitor-Eadd_applet("foo", "bar" , sub1, sub2)> "foo" a name "bar" a event sub1 the condition as perl code sub2 the action as perl code For example: C<-EMonitor-Eadd_applet('motz', 'precmd', 'int(rand 6) ? 0: 1', '$_[0]-Eparent-Emotz-Efortune')> Or delete an applet: C<-EMonitor-Edelete_applet("foo")> =cut