projects
/
MojoFacets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41a6963
)
read initial header order from json files
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 25 May 2010 21:37:26 +0000
(23:37 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 25 May 2010 21:37:26 +0000
(23:37 +0200)
lib/MojoFacets/Data.pm
patch
|
blob
|
history
diff --git
a/lib/MojoFacets/Data.pm
b/lib/MojoFacets/Data.pm
index
bfc1183
..
51e02f9
100644
(file)
--- a/
lib/MojoFacets/Data.pm
+++ b/
lib/MojoFacets/Data.pm
@@
-127,6
+127,16
@@
sub _load_path {
if $stats->{$n}->{array} == $stats->{$n}->{count};
}
+ if ( ! @header ) {
+ if ( defined $data->{header} ) {
+ if ( ref $data->{header} eq 'ARRAY' ) {
+ @header = @{ $data->{header} };
+ } else {
+ warn "header not array ", dump( $data->{header} );
+ }
+ }
+ }
+
@header =
sort { $stats->{$b}->{count} <=> $stats->{$a}->{count} }
grep { defined $stats->{$_}->{count} } keys %$stats