watch

Synopsis

watch('$var @ar')

Declares all ovariables in the string as "watch" variables. Any attempt to set a value in a watched container will print out a warning. The warning does not prevent the setting of the variable. The value will change as normal.

Parameters

'$var @ar' - a string containing a space separated list of variables to watch. These vars must already exist.

Side Effects / Notes

Errors

Examples

sub test { $1 = "bar"; } $fluffy = "foo"; watch('$fluffy'); test($fluffy); println("The value of \$fluffy is $fluffy");

Warning: watch(): $fluffy = 'bar' at fluffy2.sl:3 The value of $fluffy is bar

See Also