• Home
  • Popular Downloads
  • Contact Us
  • Submit

Softpile

Free Downloads

Main Navigation
  • Home
  • Windows
  • Mac OS X
  • Business
  • Desktop
  • Development
  • Education
  • Games
  • Internet
  • Multimedia
  • Utilities
Home » Linux » Perltidy

Perltidy

June 17, 2009
A Perl script beautifier
Version: 20090616
License: GPL
Operating System: Linux
Homepage: perltidy.sourceforge.net
Developed by: Steve Hancock
Perltidy is a Perl script which indents and reformats Perl scripts to make them easier to read. If you write Perl scripts, or spend much time reading them, you will probably find it useful.

Configuration Files

While style preferences vary, most people would agree that it is important to maintain a uniform style within a script, and this is a major benefit provided by perltidy. Once you have decided on which, if any, special options you prefer, you may want to avoid having to enter them each time you run it. You can do this by creating a special file named .perltidyrc in either your home directory, your current directory, or certain system-dependent locations. (Note the leading ``.'' in the file name).

A handy command to know when you start using a configuration file is

perltidy -dpro

which will dump 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. This is one of a number of useful ``dump and die'' commands, in which perltidy will dump some information to standard output and then immediately exit. Others include -h, which dumps help information, and -v, which dumps the version number.

Another useful command when working with configuration files is

perltidy -pro=file

which causes the contents of file to be used as the configuration file instead of a .perltidyrc file. With this command, you can easily switch among several different candidate configuration files during testing.

This .perltidyrc file is free format. It is simply a list of parameters, just as they would be entered on a command line. Any number of lines may be used, with any number of parameters per line, although it may be easiest to read with one parameter per line. Blank lines are ignored, and text after a '#' is ignored to the end of a line.

Here is an example of a .perltidyrc file:

This is a simple of a .perltidyrc configuration file
This implements a highly spaced style
  • bl # braces on new lines
  • pt=0 # parens not tight at all
  • bt=0 # braces not tight
  • sbt=0 # square brackets not tight

If you experiment with this file, remember that it is in your directory, since if you are running on a Unix system, files beginning with a ``.'' are normally hidden.

If you have a .perltidyrc file, and want perltidy to ignore it, use the -npro flag on the command line.

Installation

For most standard installations, the standard Makefile.PL method should work:

perl Makefile.PL
make
make test
make install

The INSTALL file has additional installation notes.
perl perl script perltidy script script beautifier
Free Download 348K
0
  • Share on:

Perltidy User Reviews

Sponsored

Categories

  • Linux

Related Downloads

DBDesigner 4 Scaffold Tools for CakePHP
DBDesigner 4 Scaffold Tools for CakePHP is a tool which parses fabFORCE's ...
RSA-Haskell
RSA-Haskell is a collection of command-line cryptography tools and a ...
Jupe
Jupe is a UML Plugin for Eclipse.
Develop
Develop is a little Tool for Programmers.
Smarty PHP template engine
Smarty PHP template engine is a template engine for PHP.
Copyright © 1999-2017 Softpile Free Downloads
  • Contact Us
  • Submit
  • Privacy Policy
  • Disclaimer
  • Terms of Use