The Skopje project (click here for the Merriam-Webster dictionary page, which includes pronunciation) is an effort to add some of the more useful, yet overlooked, functionality of Perl to Java. The goal is not to try and make Java source code look like Perl (if you want to program in Perl, you'll just program in Perl). Rather, small things like join and chomp are provided to compliment existing methods such as split from the java.lang.String class.
This distribution provides a single JAR file, Perl.jar. As with any JAR, it is used at run-time by including the file in the classpath of the Java VM, either by means of the CLASSPATH environment variable or the -classpath command-line option.
All the classes (one per keyword) are contained in the com.blackperl.Perl namespace. An application can then import as it needs:
import com.blackperl.Perl.Chomp; ... // Read a line from the terminal StringBuffer line = new StringBuffer(getLineFromUser()); // Chomp operates in-place on StringBuffer, hence the hoop-jumping Chomp.chomp(line); String stringLine = line.toString(); // stringLine now has any line-ending sequence (\n, \r\n, etc.) removed
Keeping each piece of functionality in its own class will hopefully lead to smaller run-time footprints and easier use with tools that gather individual classes from multiple JAR files into single JARs for application embedding.
The package is fully documented via Javadoc. The full API docs are bundled in the distribution file.
You may also view them here.
This package is bundled as a ZIP file containing the JAR, the API documentation, the Ant build file, and the full source code (including JUnit tests).
At present, the following keywords are implemented:
The following are planned, but are not yet started or ready for release:
In addition to adding more basic keywords, future plans include providing a parallel development track for the upcoming JDK 1.5 release in order to take advantage of some key new features. Specifically, to capitalize on generics and static imports.
Report all bugs (or offer suggestions) to rjray@blackperl.com.
Skopje is released under the terms of the Artistic License as applied to Perl. Developers using Skopje, in whole or in part, in their projects may also choose to redistribute it under the terms of the GNU Lesser GPL license.