NAME

Synopsys::Extensions - Extra Functions for SPP Objects

SYNOPSIS

User defined methods

DESCRIPTION

Overview

The Synopsys::Extensions module is a place where additional functionality can be added to the SPP idiom. Every SPP object is also a Synopsys::Extensions object so any method defined here will be properly called as a method of a SPP object.

Every method defined here should make every attempt to work correctly in either Dcsh or Tcl mode. Any differences in behavior should be documented.

Methods

variable($varname, [@value])

Gets or sets a Synopsys shell variable value. $varname must be supplied, returns undef if not. In all cases, returns the current value of $varname. If @value has length greater than one, a Tcl list is generated from @value and $varname is set to that list. If @value has length one, $varname is set to the value in $value[0]. If $varname has no value, undef is returned.

If variable() is called in a scalar context, a string is returned. If called in a list context, the value of $varname is converted to a list.

alias($command, [$value])

Gets or sets a Synopsys shell alias. $command must be supplied, returns undef if not. In all cases, returns the current value of $command. If no alias for $command is defined, the empty string is returned.

Back