diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-01-23 20:00:14 +0100 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-01-23 20:00:14 +0100 |
| commit | ffebc3bb09cb6306892b7f8a3c3e023d1699de1b (patch) | |
| tree | b91d9a8c5b274a48b11d071354aeefce42bdedee /lib | |
| parent | basic github crawler using api (diff) | |
| download | github-explorer-ffebc3bb09cb6306892b7f8a3c3e023d1699de1b.tar.gz | |
tweaking and testing
Diffstat (limited to '')
| -rw-r--r-- | lib/githubexplorer/Profile.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/githubexplorer/Profile.pm b/lib/githubexplorer/Profile.pm index f580f79..d4024df 100644 --- a/lib/githubexplorer/Profile.pm +++ b/lib/githubexplorer/Profile.pm @@ -6,6 +6,7 @@ use Net::GitHub::V2::Users; sub fetch_profile { my ( $self, $login, $depth ) = @_; + return if $depth > 2; my $profile = $self->_profile_exists($login); say "fetch profile for $login ($depth)..."; @@ -28,9 +29,8 @@ sub fetch_profile { } my $followers = $github->followers(); my $local_depth = $depth + 1; - return $profile if $local_depth > 3; foreach my $f (@$followers) { - my $p = $self->fetch_profile( $f, $depth + 1 ); + my $p = $self->fetch_profile( $f, $local_depth ); next unless $p; $self->schema->resultset('Follow') ->create( |
