From a18e0aadb62be9f96c0aa42b3a6464dc933477dc Mon Sep 17 00:00:00 2001 From: khoff Date: Tue, 8 Mar 2005 18:37:31 +0000 Subject: [PATCH] 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. --- FS/FS/XMLRPC.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/FS/FS/XMLRPC.pm b/FS/FS/XMLRPC.pm index 287a502c5..d7ba75a23 100644 --- a/FS/FS/XMLRPC.pm +++ b/FS/FS/XMLRPC.pm @@ -118,9 +118,12 @@ sub _serve { #Subroutine, not method 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 ]; } -- 2.11.0