NAME
Template::Plugin::Java::Utils - Utility functions for Template::Plugin::Java.
SYNOPSIS
use Template::Plugin::Java::Utils qw/list of subroutines to import/;
SUBROUTINES
- createTemplate
-
Creates a new Template with reasonable options.
- parseOptions
-
Replaces c_c with cC and nosomething=whatever with something=0 in the keys of a hash.
- setOption
-
Adds to or sets an option in a hash, supports nested arrays and boolean options. The logic here is one of those things that just works the way it is and seems decipherable, but don't mess with it.
- parseCmdLine
-
Parses @ARGV into a hash of options and values, leaving everything else that is most likely a list of files on @ARGV.
- sqlType2JavaType( type_name [, precision for numeric types] )
-
Maps some ANSI SQL data types to the closest Java variable types. The default case is byte[] for unrecognized sql types.
- simplifyPath( path )
-
Remove any dir/../ or /./ or extraneous / from a path, as well as prepending the current directory if necessary.
- findPackageDir( directory )
-
Find package in $ENV{CLASSPATH}.
- determinePackage([ optional directory ])
-
Determine the package of the current or passed-in directory.
- isNum( string )
-
Determines whether a string is a number or not. Uses the more powerful DBI::looks_like_number heuristic if available.
- castJavaString( variable_name, target_type )
-
Casts a java String to another type using the appropriate code.
- javaTypeName( javaType )
-
Transform a java type name to a character string version. In other words, String remains String, but byte[] becomes byteArray.
ENVIRONMENT
These are the environment variables used.
- TEMPLATEPATH
-
Colon separated path to where templates can be found, used by default in the createTemplate subroutine.
- CLASSPATH
-
Searched in findPackageDir to find a directory relative to it.
AUTHOR
Rafael Kitover (caelum@debian.org)
COPYRIGHT
This program is Copyright (c) 2000 by Rafael Kitover. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
BUGS
None known.
TODO
Nothing here.
SEE ALSO
perl(1), Template(3), Template::Plugin::Java(3), Template::Plugin::JavaSQL(3) Template::Plugin::Java::Constants(3),