NAME
Parrot::Configure::Utils - Configuration Step Utilities
DESCRIPTION
The Parrot::Configure::Utils module contains utility functions for use by the configuration step classes found under config/.
The subroutines found in this module do not require the Parrot::Configure object as an argument. Those subroutines formerly found in this module which do require the Parrot::Configure object as an argument have been moved into Parrot::Configure::Compiler.
Functions
_run_command($command, $out, $err)-
Runs the specified command. Output is directed to the file specified by
$out, warnings and errors are directed to the file specified by$err. _build_compile_command( $cc, $ccflags, $cc_args )-
Constructs a command-line to do the compile.
integrate($orig, $new)-
Integrates
$newinto$orig. Returns$origif$newis undefined. prompt($message, $value)-
Prints out "message [default] " and waits for the user's response. Returns the response, or the default if the user just hit
ENTER. file_checksum($filename, $ignore_pattern)-
Creates a checksum for the specified file. This is used to compare files.
Any lines matching the regular expression specified by
$ignore_patternare not included in the checksum. copy_if_diff($from, $to, $ignore_pattern)-
Copies the file specified by
$fromto the location specified by$toif its contents have changed.The regular expression specified by
$ignore_patternis passed tofile_checksum()when comparing the files. move_if_diff($from, $to, $ignore_pattern)-
Moves the file specified by
$fromto the location specified by$toif its contents have changed. capture_output($command)-
Executes the given command. The command's output (both stdout and stderr), and its return status is returned as a 3-tuple. STDERR is redirected to test.err during the execution, and deleted after the command's run.
check_progs([$programs])-
Where
$programsmay be either a scalar with the name of a single program or an array ref of programs to search the currentPATHfor. The first matching program name is returned orundefon failure. Note: this function only returns the name of the program and not its complete path.This function is similar to
autoconf'sAC_CHECK_PROGSmacro. _slurp($filename)-
Slurps
$filenameinto memory and returns it as a string.