perltidy-sweet command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
perltidy-sweet: command not found
or when using sudo you get the following error message
sudo: perltidy-sweet: command not found
Solutions to perltidy-sweet: command not found
How To Fix perltidy-sweet: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu perltidy-sweet is provided by perltidier package.
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
To fix this problem, we can install more using the command below.
sudo apt-get -y install perltidier
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install perltidier.
sudo apt -y install perltidier
Or if you have aptitude installed you can use the following command.
sudo aptitude install perltidier
Summary
In this tutorial we learn how to fix perltidy-sweet command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.