couple small usability issues

This commit is contained in:
Raymond Chandler 2010-12-23 18:01:21 -05:00
parent 75198fe4cb
commit 08769e97b2
1 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,8 @@ sub set_callback($;$$) {
$self->{_callback}->{$event} = shift;
my $subclass = shift;
if($subclass) {
$self->{_custom_subclass} = split(/,/, $subclass);
my @subclasses = split(/,/, $subclass);
$self->{_custom_subclass} = \@subclasses;
}
}
@ -79,7 +80,7 @@ sub run($;) {
for(;;) {
# Only register for events we have callbacks for.
for my $key ( keys %{$self->{_callback}} ) {
if ($key eq "CUSTOM") {
if ($key =~ m/custom/i) {
foreach $subclass (@{$self->{_custom_subclass}}) {
$self->{_esl}->events("plain", "$key $subclass");
}