Synopsis
use PubSub::Tiny;
my $pubSub = PubSub::Tiny->new;
$pubSub->subscribe('myEvent',sub { });
$pubSub->publish('myEvent','eventData');
Description
PubSub::Tiny is a tiny implementation of a pub/sub event system in perl. It's meant to allow decoupling within an application, and does not do any permanent storage, nor does it allow any kind of IPC.

Comments
Also Mojo::EventEmitter (part of Mojolicious) is another simple publish/subscribe event system implemented is a simple way. And as it is based on objects, it does not rely on global variable.
Please sign up to post a review.