The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Vm::Dreamer::Environment

SYNOPSIS

get_restrictions(); get_say_normal();

DESCRIPTION

Provides a place for environmental variables. Currently lets you set boundaries on the base, the op_code_width and the operand_width. Used for validation during initialization.

SUBROUTINES

get_restrictions

Doesn't take any arguments and returns a hash ref with three keys - base, op_code_width and operand_width. Each in turn is a reference to a hash which has a key called min and another called max.

Used by VM::Dreamer::Validate to validate the machine definition during initialization and by VM::Dreamer::Error to populate an error string with the min/max values for a more robust error message to the user.

get_say_normal

Returns a analog of base, op_code_width and operand_width suitable for use in strings when presented to a human. Used by vM::Dreamer::Error.

AUTHOR

William Stevenson <william at coders dot coop>

SEE ALSO

VM::Dreamer VM::Dreamer::Error VM::Dreamer::Validate

COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by William Stevenson.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)