Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 8c83d607ea
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 0.675 kB
#!/usr/bin/perl
use strict;
use warnings;
use Survey::Perl::Answers::Schema;
use Config::JFDI;
use Data::Dumper;
my $conf = Config::JFDI->new( name => "Survey::Perl" );
my $config = $conf->get;
my $schema = Survey::Perl::Answers::Schema->connect(
@{ $config->{'Model::Answers'}->{connect_info} },
);
my $answer_rs = $schema->resultset('Survey');
my $ans;
open my $fh, ">", $ARGV[0] or die "can't open file for writing: $!\n";
while ( my $answer = $answer_rs->next ) {
print Dumper $answer->columns;
for my $column ( $answer->columns ) {
print $fh $column . "," . $answer->$column . "\n"
or die "couldn't write row: $!";
}
}
close $fh;
Jump to Line
Something went wrong with that request. Please try again.