From: dpvc v. a. <we...@ma...> - 2005-07-04 03:31:12
|
Log Message: ----------- Allow Parser::Number::NoDecimals() to accept a context to be modified (rather than always changing the curent context). Modified Files: -------------- pg/lib/Parser: Number.pm Revision Data ------------- Index: Number.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Number.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -Llib/Parser/Number.pm -Llib/Parser/Number.pm -u -r1.9 -r1.10 --- lib/Parser/Number.pm +++ lib/Parser/Number.pm @@ -71,7 +71,10 @@ ########################################### -sub NoDecimals {$$Value::context->flags->set(NumberCheck=>\&_NoDecimals)} +sub NoDecimals { + my $context = shift || $$Value::context; + $context->flags->set(NumberCheck=>\&_NoDecimals); +} sub _NoDecimals { my $self = shift; |