How To Install perltidier on Debian 12

Learn how to install perltidier on Debian 12 with this tutorial. perltidier is tweaks to Perl

Introduction

In this tutorial we learn how to install perltidier on Debian 12.

What is perltidier

perltidier is:

There are a number of modules on CPAN that allow users to write their classes with a more “modern” syntax. These tools eliminate the need to shift off $self, can support type checking and offer other improvements. Unfortunately, they can break the support tools that the Perl community has come to rely on. This module attempts to work around those issues.

The module uses Perl::Tidy’s “prefilter” and “postfilter” hooks to support “method” and “func” keywords, including the (possibly multi-line) parameter lists. This is quite an ugly hack, but it is the recommended method of supporting these new keywords. The resulting formatted code will leave the parameter lists untouched.

Perl::Tidy::Sweetened attempts to support the syntax outlined in the following modules, but most of the new syntax styles should work:

  • p5-mop
  • Method::Signatures::Simple
  • MooseX::Method::Signatures
  • MooseX::Declare
  • Moops
  • perl 5.20 signatures
  • Kavorka

There are three methods to install perltidier on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install perltidier Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install perltidier using apt-get by running the following command:

sudo apt-get -y install perltidier

Install perltidier Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install perltidier using apt by running the following command:

sudo apt -y install perltidier

Install perltidier 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install perltidier using aptitude by running the following command:

sudo aptitude -y install perltidier

How To Uninstall perltidier on Debian 12

To uninstall only the perltidier package we can use the following command:

sudo apt-get remove perltidier

Uninstall perltidier And Its Dependencies

To uninstall perltidier and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove perltidier

Remove perltidier Configurations and Data

To remove perltidier configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge perltidier

Remove perltidier configuration, data, and all of its dependencies

We can use the following command to remove perltidier configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge perltidier

Dependencies

perltidier have the following dependencies:

References

Summary

In this tutorial we learn how to install perltidier package on Debian 12 using different package management tools: apt, apt-get and aptitude.