William Stevenson > VM-Dreamer-0.851 > Vm::Dreamer::Environment

Download:
Dreamer/VM-Dreamer-0.851.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

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)
syntax highlighting: