This software is a Perl script beautifier designed to improve the readability and organization of Perl code. It automatically formats code structure and indentation, making code easier to read and understand.
One of the significant advantages of Perltidy is the ability to customize the formatting options based on individual preferences. Once users settle on their preferences, they can create a special file named ".perltidyrc" in the home directory, current directory, or specified system-dependent locations. With this configuration file in place, they can avoid having to enter their preferred options each time. The file is free format with a list of parameters, just as they would be entered on a command line.
To begin using a configuration file, the "perltidy -dpro" command is useful as it dumps to standard output the search that Perltidy makes when looking for a configuration file, and the contents of the one that it selects, if any. Other useful "dump and die" commands include "-h" for dumping help information and "-v" for dumping the version number.
Working with configuration files is further simplified with the "perltidy -pro=file" command that enables users to use the content of a specific file as the configuration file instead of the ".perltidyrc" file. This feature allows users to switch among several configuration files during testing effortlessly.
A ".perltidyrc" example configuration file is provided to help users experiment with the various options available. It contains parameters like -bl, braces on new lines, -pt=0, parens not Tight at all, -bt=0, braces not tight, -sbt=0, square brackets not tight. The file is free format and ignores blank lines and text after a '#' to the end of a line to boost user readability.
Finally, for successful installation, users can install Perltidy using the standard Makefile.PL method that involves running the commands "perl Makefile.PL," "make," "make test," and "make install." The INSTALL file provides additional notes on the installation process.
Version 20090616: N/A