NAME ^

Parrot::Configure::Step - Configuration Step Utilities

DESCRIPTION ^

The Parrot::Configure::Step module contains utility functions for steps to use.

Note that the actual configuration step itself is NOT an instance of this class, rather it is defined to be in the package Configure::Step. See docs/configuration.pod for more information on how to create new configuration steps.

Functions ^

integrate($orig, $new)

Integrates $new into $orig.

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, $ignorePattern)

Creates a checksum for the specified file. This is used to compare files.

Any lines matching the regular expression specified by $ignorePattern are not included in the checksum.

copy_if_diff($from, $to, $ignorePattern)

Copies the file specified by $from to the location specified by $to if it's contents have changed.

The regular expression specified by $ignorePattern is passed to file_checksum() when comparing the files.

move_if_diff($from, $to, $ignorePattern)

Moves the file specified by $from to the location specified by $to if it's contents have changed.

genfile($source, $target, %options)

Takes the specified source file, substitutes any sequences matching /\$\{\w+\}/ for the given key's value in the configuration system's data, and writes the results to specified target file.

_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.

cc_gen($source)

Generates test.c from the specified source file.

cc_build($cc_args, $link_args)

These items are used from current config settings:

  $cc, $ccflags, $ldout, $o, $link, $linkflags, $cc_exe_out, $exe, $libs
Calls the compiler and linker on test.c.

cc_run()

Calls the test (or test.exe) executable. Any output is directed to test.out.

cc_run_capture()

Same as cc_run() except that warnings and errors are also directed to test.out.

cc_clean()

Cleans up all files in the root folder that match the glob test.*.

SEE ALSO ^

Parrot::Configure::RunSteps

docs/configuration.pod


parrot