How To Install libcgi-ajax-perl on Ubuntu 18.04

In this tutorial we learn how to install libcgi-ajax-perl on Ubuntu 18.04. libcgi-ajax-perl is Perl-specific system for writing Asynchronous web applications

Introduction

In this tutorial we learn how to install libcgi-ajax-perl on Ubuntu 18.04.

What is libcgi-ajax-perl

libcgi-ajax-perl is:

CGI::Ajax is an object-oriented module that provides a unique mechanism for using Perl code asynchronously from JavaScript-enhanced HTML pages. CGI::Ajax unburdens the user from having to write extensive JavaScript, except for associating an exported method with a document-defined event (such as onClick, onKeyUp, etc.). CGI::Ajax also mixes well with HTML containing more complex JavaScript.

CGI::Ajax supports methods that return single results or multiple results to the web page, and supports returning values to multiple DIV elements on the HTML page.

Using CGI::Ajax, the URL for the HTTP GET/POST request is automatically generated based on HTML layout and events, and the page is then dynamically updated with the output from the perl function. Additionally, CGI::Ajax supports mapping URL’s to a CGI::Ajax function name, so you can separate your code processing over multiple scripts.

A primary goal of CGI::Ajax is to keep the module streamlined and maximally flexible. We are trying to keep the generated javascript code to a minimum, but still provide users with a variety of methods for deploying CGI::Ajax. And VERY little user JavaScript.

There are three methods to install libcgi-ajax-perl on Ubuntu 18.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 libcgi-ajax-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 libcgi-ajax-perl using apt-get by running the following command:

sudo apt-get -y install libcgi-ajax-perl

Install libcgi-ajax-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libcgi-ajax-perl using apt by running the following command:

sudo apt -y install libcgi-ajax-perl

Install libcgi-ajax-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 libcgi-ajax-perl using aptitude by running the following command:

sudo aptitude -y install libcgi-ajax-perl

How To Uninstall libcgi-ajax-perl on Ubuntu 18.04

To uninstall only the libcgi-ajax-perl package we can use the following command:

sudo apt-get remove libcgi-ajax-perl

Uninstall libcgi-ajax-perl And Its Dependencies

To uninstall libcgi-ajax-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libcgi-ajax-perl

Remove libcgi-ajax-perl Configurations and Data

To remove libcgi-ajax-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libcgi-ajax-perl

Remove libcgi-ajax-perl configuration, data, and all of its dependencies

We can use the following command to remove libcgi-ajax-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libcgi-ajax-perl

References

Summary

In this tutorial we learn how to install libcgi-ajax-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.