How To Install libevent-distributor-perl on Ubuntu 20.04
Introduction
In this tutorial we learn how to install libevent-distributor-perl
on Ubuntu 20.04.
What is libevent-distributor-perl
libevent-distributor-perl is:
Instances of this class provide a simple publish/subscribe mechanism within a single process, for either synchronous or Future-based asynchronous use.
A given instance has a set of named events. Subscribers are CODE references attached to a named event. Publishers can declare the existence of a named event, and then later invoke it by passing in arguments, which are distributed to all of the subscribers of that named event.
It is specifically not an error to request to subscribe an event that has not yet been declared, in order to allow multiple modules of code to be loaded and subscribe events the others publish, without introducing loading order dependencies. An event only needs to be declared by the time it is fired.
Natively all of the events provided by the distributor are fully-asynchronous in nature. Each subscriber is expected to return a Future instance which will indicate its completion; the results of these are merged into a single future returned by the fire method itself. However, to support synchronous or semi-synchronous programs using it, both the observe and invoke methods also have a synchronous variant. Note however, that this module does not provide any kind of asynchronous detachment of synchronous functions; using the /subscribe_sync method to subscribe a long-running blocking function will cause the fire_* methods to block until that method returns. To achieve a truely-asynchronous experience the attached code will need to use some kind of asynchronous event system.
This description was automagically extracted from the module by dh-make-perl.
There are three methods to install libevent-distributor-perl
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install libevent-distributor-perl Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install libevent-distributor-perl
using apt-get
by running the following command:
sudo apt-get -y install libevent-distributor-perl
Install libevent-distributor-perl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libevent-distributor-perl
using apt
by running the following command:
sudo apt -y install libevent-distributor-perl
Install libevent-distributor-perl Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install libevent-distributor-perl
using aptitude
by running the following command:
sudo aptitude -y install libevent-distributor-perl
How To Uninstall libevent-distributor-perl on Ubuntu 20.04
To uninstall only the libevent-distributor-perl
package we can use the following command:
sudo apt-get remove libevent-distributor-perl
Uninstall libevent-distributor-perl And Its Dependencies
To uninstall libevent-distributor-perl
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove libevent-distributor-perl
Remove libevent-distributor-perl Configurations and Data
To remove libevent-distributor-perl
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge libevent-distributor-perl
Remove libevent-distributor-perl configuration, data, and all of its dependencies
We can use the following command to remove libevent-distributor-perl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libevent-distributor-perl
References
Summary
In this tutorial we learn how to install libevent-distributor-perl
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.