From ffebc3bb09cb6306892b7f8a3c3e023d1699de1b Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sat, 23 Jan 2010 20:00:14 +0100 Subject: tweaking and testing --- lib/githubexplorer/Profile.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/githubexplorer') 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( -- cgit v1.2.3