insert column names in first line of export
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 30 Jun 2010 22:28:21 +0000 (00:28 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 30 Jun 2010 22:28:21 +0000 (00:28 +0200)
commented with # in first column, and tab-delimited

lib/MojoFacets/Data.pm

index d9c1dfd..b0cc4fa 100644 (file)
@@ -812,6 +812,7 @@ sub items {
        if ( $self->param('export') ) {
                my $export_path = $self->_export_path( 'items', @columns);
                open(my $fh, '>', $export_path) || die "ERROR: can't open $export_path: $!";
+               print $fh "#",join("\t",@columns),"\n";
                foreach my $f ( 0 .. $#$filtered ) {
                        print $fh join("\t", map {
                                my $i = $data->{items}->[ $filtered->[$f] ];