From: Davide P.C. <dp...@un...> - 2005-10-20 13:24:56
|
> This is great. Last week I had a problem I was updating, considered > using Multipart, but wanted a pop-up menu as one of the parts. Sorry it came too late. > I don't know if this is documented yet, but could we document an > example of using Mulitpart where computing the result is basically an > AND of cmp methods for the constituant parts of the MuliPart? This is off the top of my head (read "untested"), but it should work: $mp->cmp(checker=>sub { my ($correct,$student) = @_; foreach my $i (0..scalar(@{$correct})-1) { return 0 if $correct->[$i] != $student->[$i]; } return 1; }); |