Package DE_EPAGES::Core::API::Program::Tools
Provides auxiliary functions for DE_EPAGES::Core::API::Program methods.
@EXPORT_OK |
Functions
AddJavaOpt
adds option $Option to environment of @$Servers.
Syntax |
AddJavaOpt($Option, $Servers); |
Example |
AddJavaOpt('-Xmx256M'); AddJavaOpt('-Xmx256M', [qw(epagesj)]); |
Input |
|
FindExeInPath
Returns the absolute path (first occurence) of $File in $ENV{PATH}. Returns undef if the file is not found.
Syntax |
$ExePath = FindExeInPath($File); |
Example |
$ExePath = FindExeInPath('dot.exe'); |
Input |
|
Return |
|
FindProgramFile
Returns the absolute path (latest version) of $PathGlob in $ENV{PROGRAMFILES} For 64-bit windows returns the 64-bit exe if exists, else the 32-bit exe. $PathGlob must not have more than one '*'.
Syntax |
$ExePath = FindProgramFile($PathGlob); |
Example |
$ExePath = FindProgramFile('Java/jdk1.7*/bin/java.exe'); |
Input |
|
Return |
|
GetEnvFromRegistry
Returns the value of the environment variable $Env from registry
Syntax |
$Value = GetEnvFromRegistry($Env); |
Example |
$Arch = GetEnvFromRegistry('PROCESSOR_ARCHITECTURE'); |
Input |
|
Return |
|
Has64BitOS
Returns 1 if operating system is 64 bit, else 0.
Syntax |
$Is64 = Has64BitOS(); |
Example |
$ENV{PROCESSOR_ARCHITECTURE} = 'AMD64' if Has64BitOS(); |
Return |
|
ProgramFileDir
Returns the program files directory derived from $ENV{PROGRAMFILES} If $Bits is set, returns the 32 or 64 bit variant depending on $Bits. If $Bits is unset, returns the 64 bit variant (if exist), else 32 bit. Returns undef if the 64-bit directory is requested on a 32-bit system.
Syntax |
$Directory = ProgramFileDir($Bits); |
Example |
$Directory = ProgramFileDir(); $Directory = ProgramFileDir(32); |
Input |
|
Return |
|