How To Install libeval-closure-perl on Ubuntu
Posted on April 1, 2023  (Last modified on May 20, 2023 )
3 minutes • 483 words
Introduction
In this tutorial we learn how to install libeval-closure-perl
on Ubuntu.
What is libeval-closure-perl
libeval-closure-perl is:
String eval is often used for dynamic code generation. For instance, Moose uses it heavily, to generate inlined versions of accessors and constructors, which speeds code up at runtime by a significant amount. String eval is not without its issues however - it’s difficult to control the scope it’s used in (which determines which variables are in scope inside the eval), and it can be quite slow, especially if doing a large number of evals.
Eval::Closure attempts to solve both of those problems. It provides an eval_closure function, which evals a string in a clean environment, other than a fixed list of specified variables. It also caches the result of the eval, so that doing repeated evals of the same source, even with a different environment, will be much faster (but note that the description is part of the string to be evaled, so it must also be the same (or non-existent) if caching is to work properly).
There are three methods to install libeval-closure-perl
on Ubuntu. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install libeval-closure-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 libeval-closure-perl
using apt-get
by running the following command:
sudo apt-get -y install libeval-closure-perl
Install libeval-closure-perl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libeval-closure-perl
using apt
by running the following command:
sudo apt -y install libeval-closure-perl
Install libeval-closure-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 libeval-closure-perl
using aptitude
by running the following command:
sudo aptitude -y install libeval-closure-perl
How To Uninstall libeval-closure-perl on Ubuntu
To uninstall only the libeval-closure-perl
package we can use the following command:
sudo apt-get remove libeval-closure-perl
Uninstall libeval-closure-perl And Its Dependencies
To uninstall libeval-closure-perl
and its dependencies that are no longer needed by Ubuntu, we can use the command below:
sudo apt-get -y autoremove libeval-closure-perl
Remove libeval-closure-perl Configurations and Data
To remove libeval-closure-perl
configuration and data from Ubuntu we can use the following command:
sudo apt-get -y purge libeval-closure-perl
Remove libeval-closure-perl configuration, data, and all of its dependencies
We can use the following command to remove libeval-closure-perl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libeval-closure-perl
Dependencies
libeval-closure-perl have the following dependencies:
References
Summary
In this tutorial we learn how to install libeval-closure-perl
package on Ubuntu using different package management tools: apt, apt-get and aptitude.