[p4perl] Perl form converter ignores numbers +PATCH
John.LoVerso at mathworks.com
Wed Aug 29 06:47:13 PDT 2007
We had some test code that effectively did this:
my %spec = ( Change=>1, ...);
This was getting this error:
Error in change specification.
Missing required field 'Change'.
The problem ended up being that PerlClientUser::HashToForm() would
ignore any hash value that wasn't a string. The above really needs to
my %spec = ( Change=>'1', ...);
The '_Run' method converts numbers to strings when processing an
list (the code says "Be friendly and convert numeric args to char *'s),
so it was surprising that this wasn't true for forms.
I've enclosed a patch to add this conversion for forms, and to produce
a warning when it encounters a form field it can't handle. (The warning
could be improved to give the key it's complaining about).
John + Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 676 bytes
More information about the p4perl