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 {@link com.blackperl.Perl.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 {@link com.blackperl.Perl.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.