From: dpvc v. a. <we...@ma...> - 2008-10-14 12:44:06
|
Log Message: ----------- The copy() method now does not copy values listed by the noinherit() method (e.g., correct_ans, test_values, etc). This resolves bug #1528. Modified Files: -------------- pg/lib: Parser.pm Revision Data ------------- Index: Parser.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser.pm,v retrieving revision 1.51 retrieving revision 1.52 diff -Llib/Parser.pm -Llib/Parser.pm -u -r1.51 -r1.52 --- lib/Parser.pm +++ lib/Parser.pm @@ -72,6 +72,7 @@ sub copy { my $self = shift; my $copy = bless {%{$self}}, ref($self); + foreach my $id (Value::Formula::noinherit($self)) {delete $copy->{$id}} $copy->{tree} = $self->{tree}->copy($copy); foreach my $id (keys %{$self}) { $copy->{$id} = {%{$self->{$id}}} if ref($self->{$id}) eq 'HASH'; |