summaryrefslogtreecommitdiff
path: root/lib/githubexplorer.pm
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-02-04 12:13:40 +0100
committerfranck cuny <franck@lumberjaph.net>2010-02-04 12:13:40 +0100
commit8b93c8b6eb054f2ea059a11cd2a10fc4a60c84ad (patch)
tree9bcb6b429d075e13a7b9cf4732a8fb4e030bf5fa /lib/githubexplorer.pm
parentuse a conf file for dbi (diff)
downloadgithub-explorer-8b93c8b6eb054f2ea059a11cd2a10fc4a60c84ad.tar.gz
some error checking
Diffstat (limited to '')
-rw-r--r--lib/githubexplorer.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/githubexplorer.pm b/lib/githubexplorer.pm
index 321d6b1..52a4ec5 100644
--- a/lib/githubexplorer.pm
+++ b/lib/githubexplorer.pm
@@ -8,7 +8,17 @@ use githubexplorer::Gexf;
with qw/githubexplorer::Profile githubexplorer::Repositorie/;
-has seed => ( isa => 'ArrayRef', is => 'ro', required => 1 );
+has seed => ( isa => 'ArrayRef', is => 'rw', required => 1, lazy =>1, default =>
+sub {
+my $self = shift;
+my $profiles = $self->schema->resultset('Profiles')->search({done => {'!=', 1}}, {order_by =>
+ 'login desc'});
+my @seeds;
+while (my $p = $profiles->next) {
+ push @seeds, $p->login;
+}
+return \@seeds;
+});
has api_login => ( isa => 'Str', is => 'ro', required => 1 );
has api_token => ( isa => 'Str', is => 'ro', required => 1 );
has connect_info => ( isa => 'ArrayRef', is => 'ro', required => 1 );