Log Message:
-----------
improve error reporting for list parsing
Modified Files:
--------------
webwork2/lib/WeBWorK:
NPL.pm
Revision Data
-------------
Index: NPL.pm
===================================================================
RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/NPL.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -Llib/WeBWorK/NPL.pm -Llib/WeBWorK/NPL.pm -u -r1.1 -r1.2
--- lib/WeBWorK/NPL.pm
+++ lib/WeBWorK/NPL.pm
@@ -274,8 +274,8 @@
my $field = $1;
my $value = $2;
my ($parsed_value, $parse_errors) = parse_normal_list($field, $value);
- if ($parse_errors) {
- warn "error while parsing value \"$value\" in field $field:\n"
+ if (@$parse_errors) {
+ warn "error while parsing list value \"$value\" in field $field:\n"
. join('', @$parse_errors)
. "value may be incomplete. use with caution.\n"
. "(line $. of file $file)\n";
|