The web site also has links to RPM and Debian .deb Linux packages,
which may be convenient for some users.
+Quick Test Drive
+ If you want to do a quick test of perltidy without doing any
+ installation, get a .tar.gz or a .zip source file and see the section
+ below "Method 2: Installation as a single binary script".
+
Uninstall older versions
In certain circumstances, it is best to remove an older version of
perltidy before installing the latest version. These are:
install" step.
Method 2: Installation as a single binary script
- An alternative method is possible which avoids installing modules.
- This method can be used to quickly test perltidy to see if it will
- be useful, without doing a full installation. Also, this might be
- helpful on a system for which the Makefile.PL method does not work,
- or if you are temporarily a guest on some system.
+ If you just want to take perltidy for a quick test drive without
+ installing it, or are having trouble installing modules, you can
+ bundle it all in one independent executable script. This might also
+ be helpful on a system for which the Makefile.PL method does not
+ work, or if you are temporarily a guest on some system, or if you
+ want to try hacking a special version of perltidy without messing up
+ your regular version.
- The command to do this is
+ You just need to uncompress the source distribution, cd down into
+ it, and enter the command:
perl pm2pl
which will combine the pieces of perltidy into a single script named
- perltidy in the current directory. This script should be functional.
+ perltidy in the current directory. This script should be fully
+ functional. Try it out on a handy perl script, for example
+
+ perl perltidy Makefile.PL
+
+ This should create Makefile.PL.tdy.
After Installation
After installation by either method, verify that the installation
will generate the output file myfile.pl_tdy instead of
myfile.pl.tdy, and so on.
- Mac Installation Notes
- This release contains a patch by Axel Rose to make perltidy work under
- MacPerl. The patch is in the 'perltidy' script and prompts the user to
- interactively enter command line arguments.
-
- The normal installation process (just dropping the .tgz file on a
- distribution-provided "installme" script) should work.
-
- MacPerl users may want to open the "perltidy" script and save it as
- droplet. Then just use the drag&drop mechanism to provide the file
- parameter.
-
- Please be sure enclose in quotes any filenames which contain spaces.
- This is true for all systems, but worth emphasizing for Mac's, where
- this is common.
Troubleshooting / Other Operating Systems
Is your system missing from the notes above, or are you having trouble?
- Perltidy is quite portable. The main source of system-dependent
- programming, and system problems, has been the external system call to
- perl to perform a syntax check. This can be skipped with the -nsyn
- parameter:
-
- perltidy -nsyn filename
-
- This is the first thing to try if perltidy seems to cause a system to
- hang in some way. In fact, this has been such a problem with Windows
- 95/98/Me that the syntax check is deactivated for these systems.
-
- However, perltidy is also fairly slow, and it may be just taking a long
- time on a large file, so give it a little time to finish. To illustrate,
- on a 1.4 GHz PC the following command takes about 0.4 seconds to
- complete:
-
- $ time perltidy Makefile.PL
- real 0m0.398s
-
- for the small file Makefile.PL supplied with the distribution. On the
- very large file Tidy.pm (20500 lines, 721k bytes), however, the time
- increases to 45 seconds:
-
- $ time perltidy Tidy.pm
- real 0m45.202s
+ Perltidy is quite portable.
- Another source of system-dependent programming has to do with locating
- configuration files. You can see what is going on in the config file
- search with:
+ If there seems to be a problem locating a configuration file, you can see
+ what is going on in the config file search with:
perltidy -dpro