Closed yanick closed 7 years ago
Also, if you want, I could get all fancy schmaltzy and use Beam::Emitter for those callbacks... Just say the word, and I'll have a second PR ready within a few days (or hours, depending how I feel)
Cool thanks! I think the API "breakage" is okay, as I think I was only using pop
internally. I will do some due diligence on reverse dependencies and my own code base to be sure.
I've merged this and released as 0.42_01. production release to follow.
WARNING: this change might break the API. Before, there was some bits of code that were doing
$conn->on( each_message => sub { my $msg = pop } );
With this change,
pop
will gives the unregistering function, not the message...Also,
on
was returning$self
, but it was not documented or used.