Displaying 1 result from an estimated 1 matches for "reg_event".
Did you mean:
dev_event
2003 Oct 15
0
Manager Interface Needs a protocol
...ter a code ref to a certian Event
and then listen on the socket all day and the code registered to that certian event
will fire.
$newext = sub {
# $ref will be a hash ref of all the parameters in the event
my $ref = shift;
print "New Extension Event Detected\n\n";
};
$man->reg_event("Newexten",$newext);
$man->listen(); # a man who listens, won't your wife be jealous ;)
Now the program will just sit there and listen to all the event data
and calls the function hooked into the Nexexten event whenever it sees it
the special event ALL can be used to match ever...