don't dump scalars in export
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 27 Jun 2010 16:46:35 +0000 (18:46 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 27 Jun 2010 16:46:35 +0000 (18:46 +0200)
This destroy numeric scalars

lib/MojoFacets/Data.pm

index 86d71bc..f1eba34 100644 (file)
@@ -813,6 +813,8 @@ sub items {
                                } elsif ( ref $i->{$_} eq 'ARRAY' ) {
                                        $v =join(',', @{ $i->{$_} });
                                        $v = '\N' if length($v) == 0;
+                               } elsif ( ! ref $i->{$_} ) {
+                                       $v = $i->{$_};
                                } else {
                                        $v = dump $i->{$_};
                                }