Package com.blackperl.Perl

This package provides a subset of common Perl functionality in Java.

See:
          Description

Interface Summary
GrepBlock Interface expected by methods in the Grep class.
MapBlock Interface expected by methods in the Map class.
 

Class Summary
Chomp Static-method implementation of the Perl chomp keyword.
Chop Static-method implementation of the Perl chop keyword.
Grep Static-method implementation of the Perl grep keyword.
Join Static-method implementation of the Perl join keyword.
Lcfirst Static-method implementation of the Perl lcfirst keyword.
Map Static-method implementation of the Perl map keyword.
Ucfirst Static-method implementation of the Perl ucfirst keyword.
 

Exception Summary
TrException A class for exceptions thrown by the Tr class.
 

Package com.blackperl.Perl Description

This package provides a subset of common Perl functionality in Java. Without duplicating existing Java functionality, this package adds as static methods a number of the more-common Perl idioms that are not already present in the Java Runtime Environment libraries. This means that when a given Perl operation can be accomplished by a single method invocation, even though that method name be significantly different than the Perl function name, that operation is not provided here. For example, the Join class provides the Perl join keyword, but there is no implementation of split, since the String class already provides a split method. And the Ucfirst class does not provide uc, nor is there a Uc class, because String also provides a comparable method, toUpperCase.

Each of the Perl keywords implemented here is given its own class. This may seem excessive, but it prevents the need to load the entire set of functionality to utilize only one or two words. The public methods of all classes are all static. If the user of these classes does not want to use the class names to invoke the static methods, each class provides a singleton instance object (retrieved in each case by a instance method) that may be used to access the functionality.

If this is the version of the JAR file built for JDK 1.5 ("Tiger"), the classes are suitable for use as static imports.

This software is released under the terms of the Artistic License. Users of this software or the source code that comprises it may choose to redistribute it under either the Artistic License or under the GNU Lesser GPL, at their own discretion. No other license terms are permitted without express consent of the owner.