[Bps-public-commit] net-lighthouse branch, master, updated. 7a858858600ca13ead5a3614d8183431c6adf266

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Sep 1 05:35:52 EDT 2009


The branch, master has been updated
       via  7a858858600ca13ead5a3614d8183431c6adf266 (commit)
      from  01efefc8e2e3131ca1df430d9bc2e4b88b2d3da9 (commit)

Summary of changes:
 lib/Net/Lighthouse/Util.pm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 7a858858600ca13ead5a3614d8183431c6adf266
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Sep 1 17:35:39 2009 +0800

    return directly unless there is something in $ref

diff --git a/lib/Net/Lighthouse/Util.pm b/lib/Net/Lighthouse/Util.pm
index a6d2058..d082f84 100644
--- a/lib/Net/Lighthouse/Util.pm
+++ b/lib/Net/Lighthouse/Util.pm
@@ -9,6 +9,7 @@ use YAML::Syck;
 sub translate_from_xml {
     my $class = shift;
     my $ref = shift;
+    return unless $ref;
     $ref = XMLin( $ref, KeyAttr => [] ) unless ref $ref;
     %$ref = map { my $new = $_; $new =~ s/-/_/g; $new => $ref->{$_} } keys %$ref;
     for my $k ( keys %$ref ) {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list