freeside/FS/FS XMLRPC.pm,1.2,1.3
Kristian Hoffmann
khoff at pouncequick.420.am
Tue Mar 8 10:37:34 PST 2005
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv22685
Modified Files:
XMLRPC.pm
Log Message:
Don't require that the method results be FS::Record descendant objects. If they are, we map them to hashrefs. Otherwise we return them verbatim and hope (maybe check) that they're scalars, hashrefs, or arrayrefs.
Index: XMLRPC.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/XMLRPC.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- XMLRPC.pm 8 Mar 2005 18:15:09 -0000 1.2
+++ XMLRPC.pm 8 Mar 2005 18:37:31 -0000 1.3
@@ -118,9 +118,12 @@
warn Dumper(@result);
if (grep { UNIVERSAL::can($_, 'hashref') ? 0 : 1 } @result) {
- warn "FS::XMLRPC: One or more objects returned from '${fssub}' doesn't " .
- "support the 'hashref' method.";
- return [];
+ #warn "FS::XMLRPC: One or more objects returned from '${fssub}' doesn't " .
+ # "support the 'hashref' method.";
+
+ # If they're not FS::Record decendants, just return the results unmap'd?
+ # This is more flexible, but possibly more error-prone.
+ return [ @result ];
} else {
return [ map { $_->hashref } @result ];
}
More information about the freeside-commits
mailing list