diff options
author | khoff <khoff> | 2005-03-08 18:37:31 +0000 |
---|---|---|
committer | khoff <khoff> | 2005-03-08 18:37:31 +0000 |
commit | a18e0aadb62be9f96c0aa42b3a6464dc933477dc (patch) | |
tree | fb6b9b3e33659857188630a97ee307dfc0225176 /FS | |
parent | 68c43e49c834314e64b8c6929ba231feca151e7e (diff) |
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.
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/XMLRPC.pm | 9 |
1 files 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 ]; } |