From: dpvc v. a. <we...@ma...> - 2005-06-09 11:18:12
|
Log Message: ----------- Fixed Disable() and Enable() so that they can be called as Context()->functions->disable() and Context()->functions->enable() as well as Parser::Context::Functions::Disable() and Parser::Context::Functions::Enable() The former is the preferred syntax. Modified Files: -------------- pg/lib/Parser/Context: Functions.pm Revision Data ------------- Index: Functions.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Context/Functions.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -Llib/Parser/Context/Functions.pm -Llib/Parser/Context/Functions.pm -u -r1.4 -r1.5 --- lib/Parser/Context/Functions.pm +++ lib/Parser/Context/Functions.pm @@ -53,7 +53,9 @@ All => [qw(_alias_ Trig Numeric Vector Complex)], ); +sub disable {Disable(@_)} sub Disable { + shift if ref($_[0]) ne ""; # pop off the $self reference my @names = @_; my ($list,$name); my $context = Parser::Context->current; while ($name = shift(@names)) { @@ -66,7 +68,9 @@ } } +sub enable {Enable(@_)} sub Enable { + shift if ref($_[0]) ne ""; # pop off the $self reference my @names = @_; my ($list,$name); my $context = Parser::Context->current; while ($name = shift(@names)) { |