|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
|
| Recommended Links | Recommended Articles | Perl Lint | |||
| Xref Tools | Html converters | Beautifiers | Editors | Debuggers | |
|
Komodo |
History |
Tips | Humor | Etc |
Great tools will not make a bad programmer into a good programmer, but they will certainly make a good programmer better and they can make bad language acceptable (Java is one such example).
A good, modern IDE should at least have the following features:
Great advantage of Perl is that it is a very high level language with powerful text processing capabilities and that means that many simple support tools for Perl programmer can be written in Perl. For example brace counter, simple beautifier, etc are not that difficult to write. Other tools are more complex.
Currently the most popular Perl IDE is probably Komodo, but problem with it is the quality of editor and access to symbol table.
Perl has one good beautifier (perltidy). Also Code2HTML can convert a program source code to syntax highlighted HTML.
Authors of Programming Perl wrote about rarely used capabilities of Perl interpreter to produce cross-reference listing of the program:
18.6. Code Development Tools
The O module has many interesting Modi Operandi beyond feeding the exasperatingly experimental code generators. By providing relatively painless access to the Perl compiler's output, this module makes it easy to build other tools that need to know everything about a Perl program.
The B::Lint module is named after lint(1), the C program verifier. It inspects programs for questionable constructs that often trip up beginners but don't normally trigger warnings. Call the module directly:
Only a few checks are currently defined, such as using an array in an implicit scalar context, relying on default variables, and accessing another package's (nominally private) identifiers that start with _. See B::Lint(3) for details.% perl -MO=Lint,all myprogThe B::Xref module generates cross-reference listings of the declaration and use of all variables (both global and lexically scoped), subroutines, and formats in a program, broken down by file and subroutine. Call the module this way:
For instance, here's a partial report:% perl -MO=Xref myprog > myprof.pxrefThis shows that the parse_argv subroutine had four lexical variables of its own; it also accessed global identifiers from both the main package and from Getopt::Long. The numbers are the lines where that item was used: a leading i indicates that the item was first introduced at the following line number, and a leading & means a subroutine was called there. Dereferences are listed separately, which is why both $Options and %$Options are shown.Subroutine parse_argv Package (lexical) $on i113, 114 $opt i113, 114 %getopt_cfg i107, 113 @cfg_args i112, 114, 116, 116 Package Getopt::Long $ignorecase 101 &GetOptions &124 Package main $Options 123, 124, 141, 150, 165, 169 %$Options 141, 150, 165, 169 &check_read &167 @ARGV 121, 157, 157, 162, 166, 166The B::Deparse is a pretty printer that can demystify Perl code and help you understand what transformations the optimizer has taken with your code. For example, this shows what defaults Perl uses for various constructs:
The -p switch adds parentheses so you can see Perl's idea of precedence:% perl -MO=Deparse -ne 'for (1 .. 10) { print if -t }' LINE: while (defined($_ = <ARGV>)) { foreach $_ (1 .. 10) { print $_ if -t STDIN; } }You can use -q to see what primitives interpolated strings are compiled into:% perl -MO=Deparse,-p -e 'print $a ** 3 + sqrt(2) / 10 ** -2 ** $c' print((($a ** 3) + (1.4142135623731 / (10 ** (-(2 ** $c))))));And this shows how Perl really compiles a three-part for loop into a while loop:% perl -MO=Deparse,-q -e '"A $name and some @ARGV\n"' 'A ' . $name . ' and some ' . join($", @ARGV) . "\n";You could even call B::Deparse on a Perl bytecode file produced by perlcc -b, and have it decompile that binary file for you. Serialized Perl opcodes may be a tad tough to read, but strong encryption they are not.% perl -MO=Deparse -e 'for ($i=0;$i<10;$i++) { $x++ }' $i = 0; while ($i < 10) { ++$x; } continue { ++$i }
DzSoft Perl Editor has debugging features, a very comfortable editor with syntax highlighting, a syntax check feature that finds errors in your script, and many other features for easy and comfortable Perl development.
Customizable Syntax Highlighting
[Aug 25, 2005] Perl.com Perl Needs Better Tools By Matisse Enzer
Perl is in danger of becoming a fading language--new programmers are learning Java and Python in college, and companies like Google hardly use Perl at all. If you are afraid that Perl may be in danger of becoming irrelevant for medium-to-large projects, then read on.
The Scary Part
I have discussed the future of Perl with managers from companies that currently use it and find that they worry about the future of Perl. One company I spoke with here in San Francisco is rewriting their core application in Java. Another company worries they will not be able to find new Perl programmers down the road. Yet another uses Perl for major projects, but suffers from difficulty in refactoring their extensive code base.
There are many reasons why companies care about the future of Perl. I offer a part of a solution: better tools for Perl can be a major part of keeping Perl relevant and effective as the primary language for medium and large projects.
Related Reading
When measuring the effectiveness of a development environment (people, language, tools, processes, etc.), a key measure is how expensive and painful it is to make changes to existing code. Once a project or system has grown to thousands of lines of code in dozens (or hundreds) of modules, the cost of making changes can escalate to the point where the team is afraid to make any significant change. Excellent tools are one of the ways to avoid this unhappy situation, or at least reduce its impact. Other factors are excellent processes and, of course, excellent people.
21st-Century Integrated Development Environments for Perl
I propose that more, high-quality development tools will help keep Perl relevant and alive in medium and large project environments. My focus in this article is on IDEs, or Integrated Development Environments, and primarily those with a graphical interface.
An IDE is an integrated set of tools for programming, combining a source code editor with a variety of other tools into a single package. Common features of modern IDEs include refactoring support, version control, real-time syntax checking, and auto-completion of code while typing.
I want to make it clear right at the outset that a team of highly skilled Perl programmers, using only tools that have been around for years (such as
emacs,vi,cvs, andmake) can and do build large, sophisticated, and successful projects. I am not worried about those programmers. I am worried about the larger population of programmers with one to five years of experience, and those who have not yet begun to program: the next generation of Perl programmers.Great tools will not make a bad programmer into a good programmer, but they will certainly make a good programmer better. Unfortunately, the tools for Perl are years behind what is available for other languages, particularly Java.
One powerful example is the lack of graphical IDEs for Perl with excellent support for refactoring. Several IDEs for Java have extensive refactoring support. Only one for Perl, the EPIC plugin for Eclipse, supports even a single refactoring action.
For an example of how good IDEs have inspired at least one Perl developer, see Adam Kennedy's Perl.com article on his new PPI module and Scott Sotka's Devel::Refactor module (used in EPIC).
I acknowledge that a graphical IDE is not the be-all of good tools. Just as some writers reject word processors in favor of typewriters or hand-written manuscripts, some programmers reject graphical IDEs and would refuse a job that required them to use one. Not everyone has (nor should have) the same tool set, and there are things a pencil can do that
viandemacswill never do. That said, IDEs have wide use in businesses doing larger projects, and for many programmers and teams they provide major increases in productivity.Another important point is that while this article discusses over a dozen specific tools or features, having all the tools in a single package produces the biggest value. An IDE that provides all of these features in a single package that people can easily install, easily extend, and easily maintain across an entire development team has far more value than the sum of its parts.
There is a big win when the features provided by an IDE immediately upon installation include all or almost all of the tools and features discussed here and where the features "know" about each other. For example, it is good if you enter the name of a non-existent subroutine and the real-time syntax checker catches this. It is much better if the code-assist feature then pops up a context menu offering to create a stub for the subroutine or to correct the name to that of an existing similar subroutine or method from another class that is available to the current file. (This is standard behavior for some Java IDEs.)
What Would a 21st-Century Perl Tool Set Contain?
Perl needs a few great IDEs--not just one, but more than one so that people have a diverse set to choose from. Perl deserves and needs a few great IDEs that lead the pack and set the standard for IDEs in other languages.
I am well aware that the dynamic nature of Perl makes it harder to have a program that can read and understand a Perl program, especially a large and complex one, but the difficulty in comprehending a Perl program makes the value of such a tool all the greater, and I have faith that the Perl community can overcome some of the built-in challenges of Perl. Indeed, it is among the greatest strengths of Perl that Perl users can adapt the language to their needs.
A great Perl IDE will contain at least the following, plus other features I haven't thought of. (And, of course, there must be many of those!)
- A syntax-coloring text editor.
- Real-time syntax-checking to catch and display syntax errors as you type.
- Version control integration to check out and compare code using CVS, Subversion, etc.
- A code-assist editor, to provide a list of methods when you type in an object reference, for example.
- Excellent refactoring support.
- A tree view of source files and resources.
- Support for creating and running unit tests.
- Language-specific help.
- Real-time display of debugging results.
- Automatic code reformatting.
- Seamless handling of multiple languages (such as Perl and C, Perl and Java, Perl and PHP, or Perl and Python).
- Automated build and test support.
Most of the screen shot examples in this article use the EPIC Perl IDE. At present, it has the largest amount of the features on my list (although it certainly doesn't have all of them).
Syntax-Coloring Text Editor
Most of you have probably seen this. It is available under
vim,emacs, BBEdit, and TextPad. Just about every decent text editor will colorize source code so that keywords, operators, variables, etc., each have their own color, making it easier to spot syntax errors such as forgetting to close a quote pair.Real-Time Syntax Checking
Figure 1. Real-time syntax checkingThe IDE in Figure 1 shows that line 4 has an error because of the missing
)and that line 5 has an error because there is no declaration of$naame(anduse strictis in effect).A key point here is that the IDE shows these errors right away, before you save and compile the code. (In this example, the EPIC IDE lets you specify how often to run the syntax check, from 0.01 to 10.00 seconds of idle time, or only on demand.)
As nice as this is, it would be even better if the IDE also offered ways to fix the problem, for example, offering to change
$naameto$name. Figure 2 shows an IDE that does exactly that; unfortunately, for Java, not Perl.
Figure 2. Syntax help from the IDEIt would be great if Perl IDEs offered this kind of help.
Version Control Integration
All non-insane large projects use version control software. The most common version control software systems are probably CVS, Perforce, Subversion, and Visual SourceSafe. Figure 3 shows an IDE comparing the local version of a file to an older version from the CVS repository.
Figure 3. Comparing a local file to an older version in CVS--click image for full-size screen shotCVS integration is available in many modern code editors, including
emacs,vim, and BBEdit, as well as graphical IDEs such as Eclipse and Komodo Pro. Subversion integration is available as a plugin for Eclipse; Komodo Pro supports Perforce and Subversion.A Code-Assist Editor
Suppose that you have just typed in an object reference and want to call a method on the object, but you are not sure what the method name is. Wouldn't it be nice if the editor popped up a menu listing all of the methods available for that object? It might look something like Figure 4.
Figure 4. Automatic code completionIn this example, the IDE is able to figure out which class the object
$qis an instance of and lists the names of the available methods. If you type ap, then the list shows only the method names beginning withp. If you typepa, then the list shows only theparam()andparse_params()methods.Excellent Refactoring Support
The easier it is to do refactoring, the more often people will do it. The following list contains the most common refactorings. Your personal list will probably be a little different. All of these are things you can do "manually," but the idea is to make them into one or two-click operations so that you will do them much more often. (For a extensive list of refactoring operations, see Martin Fowler's alphabetical list of refactorings.)
Extract Subroutine/Method
The IDE should create a new subroutine using the selected code and replace the selected code with a call to the new subroutine, with the proper parameters. Here's an example of using the Extract Subroutine refactoring from Eclipse/EPIC (which uses the Devel::Refactor module).
First, you select a chunk of code to turn into a new subroutine, and then select Extract Subroutine from a context menu. You then get the a dialog box asking for the name of the new subroutine (shown in Figure 5).
Figure 5. Code before Extract Subroutine refactoringThe IDE replaces the selected code with a call to the new subroutine, making reasonable guesses about the parameters and return values (Figure 6). You may need to clean up the result manually.
Figure 6. Code after Extract SubroutineFigure 7 shows the new subroutine created by the IDE. In this case, it needs no changes, but sometimes you will need to adjust the parameters and/or return value(s).
Figure 7. The new subroutine created by Extract SubroutineIdeally, the editor should prompt you to replace similar chunks of code with calls to the new subroutine.
Rename Subroutine/Method
The IDE should find all the calls to the subroutine throughout your project and offer to change them for you. You should be able to see a preview of all of the places a change could occur, and to accept or reject each one on a case-by-case basis. The action should be undoable.
Rename Variable
Like Rename Subroutine, this feature should find all occurrences throughout the project and offer to make the changes for you.
Change Subroutine/Method Signature
The IDE should be able to make reasonable guesses about whether each subroutine or method call is supplying the proper parameters. Partly this is to enable the real-time syntax checking mentioned above, and partly this is to enable you to select a subroutine declaration and tell the IDE you want to refactor it by adding or removing a parameter. The IDE should then prompt you for the change(s) you want to make, do its best to find all of the existing calls to the subroutine, and offer to correct the subroutine calls to supply the new parameters.
Obviously, this is an especially tricky thing to do in Perl, where subroutines fish their parameters out of
@_. So the IDE would have to look carefully at how the code usesshift,@_, and$_[]in order to have a reasonable guess about the parameters the subroutine is expecting. In many common cases, though, a Perl IDE could make a reasonable guess about the parameters, such as in the following two examples, so that if you added or removed one, it could immediately prompt you about making corrections throughout the project:sub doSomething { my $gender = shift; my $age = shift; # Not too terribly hard to guess that $gender and $age are params } sub anotherThing { my ($speed,$direction) = @_; # No magic needed to guess $speed and $direction are params. }Move Subroutine/Method
This refactoring operation should give you a list or dialog box to choose the destination file in your project. The IDE should allow you to preview all of the changes that it would make to accomplish the move, which will include updating a call to the subroutine/method to use the proper class. At a minimum, the IDE should show you or list all of the calls to the subroutine so you can make the appropriate changes yourself. Ideally, the IDE should make a guess about possible destinations; for example, if
$selfis a parameter to the method being moved, then the IDE might try assuming the method is an object (instance) method and initially only list destination classes that inherit from the source class, or from which the source class inherits.Change a Package Name
As with Rename Subroutine and Rename Variable, when changing a package name, the IDE should offer to update all existing references throughout your project.
Tree View and Navigation of Source Files and Resources
Another useful feature of good IDEs is being able to view all of the code for a project, or multiple projects, in a tree format, where you can "fold" and "unfold" the contents of folders. All of the modern graphical IDEs support this, even with multiple projects in different languages.
Being able to view your project in this manner gives you both a high-level overview and the ability to drill down into specific files, and to mix levels of detail by having some folders show their contents and some not.
For example, Figure 8 shows a partial screen shot from ActiveState's Komodo IDE.
Figure 8. Tree view of code in KomodoSupport for Creating and Running Unit Tests
Anyone who has installed Perl modules from CPAN has seen unit tests--these are the various, often copious, tests that run when you execute the
make testpart of the installation process. The vast majority of CPAN modules include a suite of tests, often using the Test::Harness and/or Test::More modules. A good IDE will make it very easy to both create and run unit tests as you develop your project.The most basic form of support for unit tests in an IDE is simply to make it easy to execute arbitrary scripts from within the IDE. Create a test.pl for your project and keep adding tests to it or to a t/ subdirectory as you develop, and keep running the script as you make changes. All modern IDEs provide at least this minimal capability.
A more sophisticated level of support for unit tests might resemble the Java IDE feature for tests written in JUnit, where you can select an existing class file (a .pm file in Perl) and ask the IDE to create a set of stub tests for every subroutine in the file. (See JUnit and the Perl module
Test::Unitfor more on unit tests.) Furthermore, the IDE should support running a set of tests and giving simple visual feedback on what passed/failed. The standard approach in the JUnit world is to show either a "green bar" (all passed) or "red bar" (something failed) and then allow you to see details on failures. Other nice-to-have features include calculating code-coverage, providing statistical summaries of tests, etc.Figure 9 shows a successful run of a Java test suite with Eclipse.
Figure 9. A successful JUnit test runFigure 10 shows the same test run, this time with a failure.
Figure 10. A JUnit test run with a failureA stack trace of the failure message appears in another part of the window (cropped out here to save space). If you double-click on the test that failed (
testInflate), the IDE will open the file (BalloonTest, in this case) and navigate to the test function.The central idea is that the IDE should make it as painless as possible to add and modify and run tests, so you will do more of it during development.
Language-Specific Help
This is a fairly straightforward idea--the IDE should be able to find and display the appropriate documentation for any keyword in your code, so if you highlight
pushand ask for help, you should see thepushentry from the Perl documentation. If you highlight a method or subroutine or other symbol name from an imported module, the IDE should display the module's documentation for the selected item. Of course, this requires that the documentation be available in a consistent, machine-readable form, which is only sometimes true.Debugger with Real-Time Display of Results
All modern IDEs offer support for running your code under a debugger, usually with visual display of what's going on, including the state of variables. The Komodo IDE supports debugging Perl that is running either locally or remotely.
Typical support for debugging in an IDE includes the ability to set breakpoints, monitor the state of variables, etc. Basically, the IDE should provide support for all of the features of the debugger itself. Graphical IDEs should provide a visual display of what is going on.
Automatic Code Reformatting
This means automatically or on-demand re-indenting and other reformatting of code. For example, when you cut and paste a chunk of code, the IDE should support reformatting the chunk to match the indentation of its new location. If you change the number of spaces or tabs for each level of indentation, or your convention for the placement of curly braces, then the IDE should support adjusting an entire file or all files in your project.
Seamless Handling of Multiple Languages
Many large software projects involve multiple languages. This is almost universally true in the case of web applications, where the user interface typically uses HTML, CSS, and JavaScript, and the back end uses one or more of Perl, PHP, Java, Python, Ruby, etc. It is very helpful to have development tools that seamlessly integrate work done in all of the languages. This is becoming quite common. For example, both Komodo and Eclipse support multiple languages.
Automated Building and Testing
This feature can be very basic by making it easy to run an arbitrary script from within the IDE and to see its output. This could be as simple as having the IDE configured to have a one-click way of running the traditional Perl module build-and-test commands:
$ perl Makefile.PL $ make $ make testA more advanced version of this feature might involve having the IDE create stub code to test all of the subroutines in an existing file, or to run all of the scripts in a specified directory under
Test::Harness, or to run a set of tests using Test::Unit::TestRunner or Test::Unit::TkTestRunner. (The latter provides a GUI testing framework.)Conclusion and Recommendations
While there are many tools for helping Perl development, the current state of the Perl toolbox is still years behind those of other languages--perhaps three to five years behind, when compared to Java tools. While there are several tools for Java that have all the features described above, virtually none for Perl have all of them. On the other hand, things are looking up; they are better now than a year ago. It's possible to close that gap in a year or two.
A couple of obvious areas where improvements could be somewhat easy are adding more features to EPIC and Komodo. EPIC is open source, so there is potentially a wider pool of talent that could contribute. On the other hand, Komodo has a company with money behind it, so people actually get paid to improve it. Hopefully both tools will get better with time.
Another interesting possibility is the development of new IDEs or adding to existing ones by using Adam Kennedy's PPI module, which provides the ability to parse Perl documents into a reasonable abstract syntax tree and to manipulate the elements and re-compose the document. There is a new Perl editor project, VIP, that is in the design stages and is intended to be "pluggable" and to have special features to support pair programming.
Finally, I've gathered a couple of lists of links for related material. The first list below consist of IDEs and graphical editors for Perl, and the second list consists of various related articles and websites. I hope this is all inspirational and helpful.
[Jul 29, 2005] Open Perl IDE is an integrated development environment for writing and debugging Perl scripts with any standard perl distribution under Windows 95/98/NT/2000.
This software is written in Delphi 5 Object Pascal and Perl and it is OpenSource, distributed under Mozilla Public Licence 1.1 and hosted by SourceForge.
Please visit our project page to get further information.
Now, take a look at some screenshots, read the User Manual to get a more detailed description of Open Perl IDE or download the latest release (Version 1.0).
The new release 1.0 is the first non-beta version of Open Perl IDE and fixes most of the bugs reported for previous releases. However, some of the changes are much more than simple bugfixes:
- Better syntax coloring by using a new highlighter component.
- Important debugger improvements, including better support for huge arrays.
- Previous instance detection on program start.
- Several minor HelpViewer and Configuration enhancements.
For any information, questions, remarks or bug reports, please send a message to Jürgen Güntherodt.
[Jan 2, 2005] ExecPerl - Utilities for executing perl scripts vim online
Provides the following commands:
:ExecPerl script_name
This will execute script_name using the perl
interpreter.
:ExecPerlMore
This will execute script_name using the perl
interpreter. If the output would scroll past the end
of the screen, execution pauses and waits for a
keystroke before continuing.
:ExecPerlDump
This will ask you for an output file and then
execute script_name using the perl interpreter. The
output from the script is dumped to the file that you
entered when you were prompted. You may press enter
instead of entering a file name to accept the default
filename.
Also, The following keys are mapped by default. You'll have to
comment them if you don't want this behavior:
<F5>: ExecPerl the current file being edited
<C-F5>: ExecPerlMore the current file being edited
<S-F5>: ExecPerlDump the current file being edited
[Jan 2, 2005] perl_synwrite.vim - checks Perl syntax before allowing file write vim online
This plugin causes write attempts to fail if the contents of the buffer produce an error when run through "perl -c"
The plugin uses can use autocommands for the BufWriteCmd and FileWriteCmd events, but by default only provides a :Write command to check-then-write.install details Put this file in one of the locations described in :help ftplugin such as "~/.vim/after/ftplugin"; if you want autocommands, which are quirky, define perl_synwrite_au = 1
[Jan 2, 2005] perl.vim - Perl compiler script vim online
This is compiler script that runs perl -Wc and parses all error and warnings. For more information how to use compilers in VIM read help.
This version has workaround with redirecting stderr on windows platform so it can run either on unixes or windows.
Enjoy. Lukasinstall details Just put in the $VIMRUNTIME/compiler directory and run :make.
[Dec 26, 2004] http://ppt.perl.org/ Do you know about the Perl Power Tools, at and mirrored various other places?
It is a great project to implement versions of standard Unix tools in pure Perl, so that they can run anywhere Perl does. Those utilities might be perfect for those who like me I prefer Unix/Linux as the development platforms, but Windows for my desktop. They also might be an alternative to the Cygwin stuff even for those who do not use Perl for own scripting. They should be the alternative for those who does use Perl. Once Perl has been installed the PPT stuff only needs to be copied somewhere and that directory added to the PATH. You can also learn some great Perl coding tricks by reading the PPT utilities. Thanks for the anonymous feedback to the Softpanorama for this info.
perl.com Perl Command-Line Options
Perl has a large number of command-line options that can help to make your programs more concise and open up many new possibilities for one-off command-line scripts using Perl. In this article we'll look at some of the most useful of these.
ONLamp.com Which Open Source Wiki Works For You
Kwiki
The Kwiki motto is a "A Quickie Wiki that's not Tricky." Installing it is pretty straightforward for a site you admin: just install the Perl package (from CPAN or elsewhere), and then type
kwiki-installin a CGI-served directory to create an instance. Installing Kwiki on a server you are not an admin of is more complicated but doable.I found the Kwiki markup not powerful. Some things are impossible with it, such as hyperlinking an arbitrary piece of text to an email address (mail fooish). I also could not find how to link a Wiki page with a text link different from the Wiki page name (like this link to LinkedWikiWikiPage). There is also no support for attachments, HTML markup as an alternative to the Wiki markup, etc. It is disappointing.
Kwiki can use either RCS or Subversion for version control. (Those who wish to use Subversion should check out the corrected Kwiki version as the CPAN Kwiki does not work with the up-to-date Subversion.) Kwiki is easily customizable and has several Kwiki enhancements available. Generally, however, they are less powerful than TWiki's.
All in all, Kwiki is easy to install and customize, but its formatting rules are lacking.
... ... ...
UseModWiki
UseModWiki is a Wiki engine written in Perl. Anecdotally, Wikipedia used this first before re-implementing their current engine. Other sites also use UseModWiki.
UseModWiki is very simple to set up and upgrade. It has a rich syntax, and allows for arbitrary characters in page names. It also supports using some HTML tags instead of the WikiWiki markup. It has other nice features, including search, a list of recent changes, and page history.
For simple Wikis, UseModWiki is a very good choice. I recommend choosing between it and PmWiki based on the feature list of both Wikis.
The B::Xref module generates cross-reference listings of the declaration and use of all variables (both global and lexically scoped), subroutines, and formats in a program, broken down by file and subroutine. Call the module this way:
For instance, here's a partial report:% perl -MO=Xref myprog > myprof.pxref
Subroutine parse_argv
Package (lexical)
$on i113, 114
$opt i113, 114
%getopt_cfg i107, 113
@cfg_args i112, 114, 116, 116
Package Getopt::Long
$ignorecase 101
&GetOptions &124
Package main
$Options 123, 124, 141, 150, 165, 169
%$Options 141, 150, 165, 169
&check_read &167
@ARGV 121, 157, 157, 162, 166, 166
This shows that the parse_argv subroutine had four
lexical variables of its own; it also accessed global identifiers from both the
main package and from Getopt::Long.
The numbers are the lines where that item was used: a leading
i indicates that the item was first introduced at the
following line number, and a leading & means a
subroutine was called there. Dereferences are listed separately, which is why
both $Options and %$Options
are shown.
[Jul 1, 2005] Perl 5.8 Documentation - BXref - Generates cross reference reports for Perl programs
The B::Xref module is used to generate a cross reference listing of all definitions and uses of variables, subroutines and formats in a Perl program. It is implemented as a backend for the Perl compiler.The report generated is in the following format:
File filename1 Subroutine subname1 Package package1 object1 line numbers object2 line numbers ... Package package2 ...Each File section reports on a single file. Each Subroutine section reports on a single subroutine apart from the special cases "(definitions)" and "(main)". These report, respectively, on subroutine definitions found by the initial symbol table walk and on the main part of the program or module external to all subroutines.
The report is then grouped by the Package of each variable, subroutine or format with the special case "(lexicals)" meaning lexical variables. Each object name (implicitly qualified by its containing Package) includes its type character(s) at the beginning where possible. Lexical variables are easier to track and even included dereferencing information where possible.
The
line numbersare a comma separated list of line numbers (some preceded by code letters) where that object is used in some way. Simple uses aren't preceded by a code letter. Introductions (such as where a lexical is first defined withmy) are indicated with the letter "i". Subroutine and method calls are indicated by the character "&". Subroutine definitions are indicated by "s" and format definitions by "f".Option words are separated by commas (not whitespace) and follow the usual conventions of compiler backend options.
-oFILENAME- Directs output to
FILENAMEinstead of standard output.-r- Raw output. Instead of producing a human-readable report, outputs a line in machine-readable form for each definition/use of a variable/sub/format.
-d- Don't output the "(definitions)" sections.
-D[tO]- (Internal) debug options, probably only useful if
-rincluded. Thetoption prints the objl&
perltidy a perl script indenter and reformatter
Perl-Tidy-20070508 - 08 May 2007 -
Steve Hancock
GNU Source-highlight - GNU Project - Free Software Foundation (FSF) v1.6 by Lorenzo Bettini
This program, given a source file, produces a document with syntax highlighting.
At the moment this package can handle
- Java
- C/C++
- Prolog
- Perl
- Php3
- Python
- Flex
- ChangeLog
as source languages, and
- HTML
- XHTML
as output format.
NOTICE: now the name of the program is source-highlight: there are no two separate programs, namely java2html and cpp2html, anymore. However there are two shell scripts with the same name in order to facilitate the migration (however their use is not advised).
GNU Source-highlight is free software. Please see the file COPYING for details. For documentation, please read this file.
GNU Source-highlight is a GNU program and its main home page is at GNU site:
http://www.gnu.org/software/src-highlite/source-highlight.htmlYou can download it from GNU's ftp site:
ftp://ftp.gnu.org/gnu/source-highlight/ or from one of its mirrors (see http://www.gnu.org/prep/ftp.html).I do not distribute Windows binaries anymore; since, they can be easily built by using Cygnus C/C++ compiler, available at http://www.cygwin.com/. However, if you don't feel like downloading such compiler, you can request such binaries directly to me, by e-mail (bettini@gnu.org) and I can send them to you.
An MS-Windows port of Source-highlight is available from http://gnuwin32.sourceforge.net/.You may also want to check the md5sum of the archives, which are also digitally signed by me (Lorenzo Bettini) with GNU gpg (http://www.gnupg.org). My GPG public key can be found at my home page (see at the end of this doc).
You can also get the patches, if they are available for a particular release (see below for patching from a previous version).
code2html by Peter Palfrader (Weasel) is a perlscript which converts a program source code to syntax highlighted HTML. It may be called from the command line or as a CGI script. It can also handle include commands in HTML files. Currently supports: Ada 95, C, C++, HTML, Java, JavaScript, Makefile, Pascal, Perl, SQL, AWK, M4, and Groff.
Homepage: http://www.palfrader.org/code2html
Freshmeat page: http://freshmeat.net/projects/code2html/
code2html is a perlscript which converts a program source code to syntax highlighted HTML. It may be called from the command line or as a CGI script. It can also handle include commands in HTML files. It really should be rewitten eventually since the code is so ugly.
License: MIT
This project has the following developers:
| Download: | http://www.giga.or.at/~weasel/pub/code2html/latest/ (1637 hits) |
| Alternate Download: | http://www.cosy.sbg.ac.at/~ppalfrad/code2html/code2html.pl.gz (193 hits) |
| Homepage: | http://www.cosy.sbg.ac.at/~ppalfrad/code2html/ (2653 hits) |
| Changelog: | http://www.cosy.sbg.ac.at/~ppalfrad/code2html/history.html (97 hits) |
VIM has (limited) support of Perl. See Softpanorama VI Editor Links
***** DzSoft Perl Editor 3.1 Very decent shareware editor with elements of Integrated environment. Contains built-in beautifier ! by Sergey Dzyubenko, Alexander Dzyubenko, DzSoft Ltd.
Perl Scripting Tool PRO Perl Made Easy Win32 editor.
NOTE: This is beta software. If you are not entirely comfortable using beta software, DO NOT install this version on your PC. We strongly recommend that BEFORE you install this software, you make a backup copy of your existing PST folder and put that copy in a separate area. Do not be alarmed if there is a big jump in beta build numbers; gaps exists because we create frequent internal builds. This is one of a series of beta releases of Perl Scripting Tool 2.00. As with any beta software, some features may not be fully implemented. If you find any problems with this software, please send us a bug report to: bugs@perlscriptingtool.com .
ped A text editor with an emacs/vi-like user interface written in perl.[July 17, 1999]
Jul 08th 1999, 21:24 stable: none - devel: 0.1.2 license: Artistic
Perl::Tk
ptkpad.0.6.5.tar.gz
This is an implementation of my Tk NotePad only it is done in Perl::Tk. The implementation is progressing quite fast and most of the features have been implemented. Currently the only features that have not been implemented are some keystroke bindings.
Unfortunately there are a few bugs and is considered a beta release now, so please do not complain about bugs> I will welcome bug fixes. It originaly started out as a line by line conversion, but as I learn more about perl I am starting to optimize as well but this is a low priority.
Some features that have been added in addition to what is in my original TkNotePad are the New Window Menu item, as well as a line and column indicator to tell the position of the cursor, and a goto line. I have also added an Options menu for changing a few things like the fonts. Many more features are planned. screenshot
| EDITOR | COST | REVIEWS From PBML Posters |
| Perl Code Editor
from PerlVision |
Free | After Wordpad, this was my first Perl editor.
Syntax highlighting and line numbering is definitely a step up.
Favorite feature: line numbering. Submitted by: Bompa [read more reviews] |
| Open Perl IDE
by Jürgen Güntherodt |
Free | A big step up, yet still light on your cpu. This
is the one I use now because it's free and runs nicely even on my 122Mhz
laptop. Favorite feature: A "run" button that runs the script and shows errors in a box at the bottom of the screen, this saves a bunch of testing time. Submitted by: Bompa |
| UltraEdit IDM Computer Solutions, Inc |
$35 | Full featured, tons of options, settings, and features.
Favorite feature: being able to "'comment out" whatever code I highlight with just one click, (and the reverse), great for troubleshooting. I loved it and might still cough up the 35 bucks. Submitted by: Bompa |
| OptiPerl
Xarka Software |
$59 | Full featured, tons of options, settings, and features,
but more money than I want to spend at this time. Submitted by: Bompa |
| Perl Builder 2.0
from Solutionsoft |
$149 | Submit a review. |
|
visiPerl+ from Softpile |
$59 | Submit a review. |
|
Komodo from ActiveState |
$295 | Submit a review. |
| DzSoft Perl Editor
by DzSoft |
$59 | Like OptiPerl, full featured, tons of options, settings,
and features, but more money than I want to spend at this time.
Submitted by: Bompa |
| EditPlus by ES Computing |
$30 | Submit a review. |
SciTE Free source project. Project Admin:Neil Hodgson |
Free | Syntax highlighting for many languages, output pane,
C-like macros (via FilerX), quick, small and mighty :-) Submitted by: Jenda |
| VIM Bram Moolenaar |
Free | Vi and emacs, the great unix editor debate. Personally
I like vim, it's quick, works great over slow links and has more features
than you can shake a stick at. Once you've grokked enough of the commands
to make this little baby run you'll never want to go back. mouse? mouse?
i don't want no steeenking mouse. You windows types can even join in the
fun too. Submitted by: Daniel Gardner |
[Oct. 07, 2000] A special module IPC-Run by Barrie Slaymaker(barries@slaysys.com). After a user's spun up on bash/ksh, it provides useful piping constructs, subprocesses, and either expect-like or event loop oriented I/O capabilities.
www.perl.com Perl Reference/Networking
[Feb 20, 2000] pftp pFtp is a ftp client written in perl. It uses the Perl/Tk and Libnet libraries, both available from the CPAN FTP site. Download: pFtp 0.05
[Jan 28, 2000] DDJ EXAMINING PERLDAP by Troy Neeriemer
Netscape's PerLDAP is an important tool for both programmers and administrators because it provides a mechanism for accessing directory information from Perl. Troy presents a high-level overview of PerLDAP, along with details of how you can use it. Additional resources include perldap.txt (listings) and perldap.zip (source code).
Paw
(Perl ASCII Widgets) is a widgetset for generating a GUI on ASCII based terminals.
It contains button, radiobutton, label, line, listbox, text_entry, pull-down-menu,
filedialog, popup-box and more. Examples are included. This
software requires Perl::Curses.
[Apr 18, 2001] Drall -- Stable version 1.4.0.0. Much better that it was and now supports authentication using the same author's Averist module. Written in Perl (GNU license) Screenshots:
Here is the quote from the author page:
If you like Drall, please express your satisfaction with a donation: send me what you feel Drall has been worth to you. If you are glad that I developed Drall and distribute it as free software, rather than following the obstructive and antisocial practices typical of software developers, reward me. If you would like me to develop more free software, contribute.
CPAN
| US Mirrors | Europe Mirrors |
| CPAN [Texas] | CPAN [funet.fi] |
| CPAN [California] cdrom.com | CPAN [ruhr-uni-bochum.de] |
| CPAN [New York] | CPAN [pasteur.fr] |
| CPAN [Massachusetts] | CPAN [ruu.nl] |
| CPAN [sunet.se] | |
| CPAN [sunsite.auc.dk] |
Etc
CGI Scripts
The listed IDEs support Perl. The list is undoubtedly incomplete, but should form a good starting point for anyone wishing to look into this further.
This software is written in Delphi 5 Object Pascal and Perl and it is OpenSource, distributed under Mozilla Public Licence 1.1 and hosted by SourceForge.
Please visit our project page to get further information.
Now, take a look at some screenshots, read the User Manual to get a more detailed description of Open Perl IDE or download the latest release (Version 1.0).
The new release 1.0 is the first non-beta version of Open Perl IDE and fixes most of the bugs reported for previous releases. However, some of the changes are much more than simple bugfixes:
- Better syntax coloring by using a new highlighter component.
- Important debugger improvements, including better support for huge arrays.
- Previous instance detection on program start.
- Several minor HelpViewer and Configuration enhancements.
For any information, questions, remarks or bug reports, please send a message to Jürgen Güntherodt.
EPIC is a plugin for the Eclipse platform. Eclipse is open-source and cross platform (Windows/Mac/Linux/Solaris, etc.). Once you have Eclipse installed, install the EPIC plugin from within the Eclipse application using the EPIC update URL. Eclipse supports Java, and with plugins, C/C++, COBOL, Perl, PHP, UML2, Python, Ruby, XML, and more. There is a large and active community around Eclipse.
PAGE
runs only on Windows (9x/ME/NT/2000/XP). It is a Rapid Application Development
tool for Perl and comes in three versions: Free, Standard ($10), and
Enterprise ($50). PAGE provides a several "wizards" for creating scripts,
modules (packages), web forms, and even database applications.
Customizable Syntax Highlighting
vimThe
well-known descendent of vi is a powerful and flexible text
editor with many plugins and extensions. Have a look at the
vim scripts ; for
example,
vim.sourceforge.net/scripts/script.php?script_id=556 and
vim.sourceforge.net/scripts/script.php?script_id=281.
This is a closed source application that runs on Win9x/NT/2000. It handles Perl and HTML and has code templates, being designed for website building. visiPerl includes a built-in web server for testing and an FTP client for code deployment. There is a free demo, or you can purchase it for $59.
Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last updated: November 08, 2008