|
|
Perl Modules: Java's Little Helpers
By David A. Utter
Staff Writer
Article Date: 2008-03-12
Perl programmers who may have to add "Write once, run anywhere" to their knowledge of "There ain't no such thing as a free lunch" can find modules to assist in working with Java.
Not every day in front of the terminal may be spent crunching enormous text files like server logs, or making a server obey its operator's needs via Perl. Sometimes the job requires the diligent Perl professional to venture into uncharged country, namely that of Java development.
Happily, other programmers traveled that path previously, leaving their wisdom in the form of modules on CPAN. TechRepublic contributed a nice list to the cause, and it bears repeated mention here.
The base Java module provides a Perl extension for accessing a Java virtual machine, either locally or remotely. Java::Import allows a Perl script to access a Java class.
Perl may be the choice of someone needing to connect to a database. With the JDBC module, the programmer can connect to a remote database system when he needs to get there with a custom JDBC driver class, the report noted.
For embedding Java code into a Perl script, the Inline::Java module helps with this task. Programmers can drop that Java code in directly, and the module will compile and invoke the code as needed.
Several other modules feature in the report. The right one for the Perl/Java pro may be waiting there right now.
About the Author: David Utter is a staff writer for WebProNews covering technology and business.
|
|