Skip to content

Commit

Permalink
has_subscribers can be a little more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 21, 2015
1 parent e59dad4 commit f021448
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

5.82 2015-02-21
5.82 2015-02-22

5.81 2015-02-20
- Deprecated object-oriented Mojo::Loader API.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/EventEmitter.pm
Expand Up @@ -22,7 +22,7 @@ sub emit {
return $self;
}

sub has_subscribers { !!@{shift->{events}{shift()} || []} }
sub has_subscribers { !!shift->{events}{shift()} }

sub on {
my ($self, $name, $cb) = @_;
Expand Down

0 comments on commit f021448

Please sign in to comment.