Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove unused autofollow() subroutine.

  • Loading branch information...
commit bb9552bb62a73aa573a704ba6ad6970c88309a5d 1 parent 1060c9c
Dave Cross authored July 20, 2013

Showing 2 changed files with 0 additions and 56 deletions. Show diff stats Hide diff stats

  1. 56  build.pl
  2. 0  index.tt
56  build.pl
@@ -48,62 +48,6 @@
48 48
              {binmode => ':utf8'})
49 49
   or die $tt->error;
50 50
 
51  
-sub autofollow {
52  
-  my $t = shift;
53  
-
54  
-  my %follow;
55  
-
56  
-  for (my $cur = -1, my $r; $cur; $cur = $r->{next_cursor}) {
57  
-    $r = $t->friends({cursor => $cur});
58  
-
59  
-    foreach (@{$r->{users}}) {
60  
-      $follow{$_->{screen_name}} = 1;
61  
-    }
62  
-  }
63  
-
64  
-#  unless ($follow) {
65  
-#    warn scalar localtime() . "\n";
66  
-#    warn $t->http_message . "\n";
67  
-#    warn $t->{_twitter_error}{error} . "\n";
68  
-#    return;
69  
-#  }
70  
-
71  
-  my %nofollow;
72  
-  if (-e 'nofollow') {
73  
-    open my $nf, '<', 'nofollow' or die $!;
74  
-    while (<$nf>) {
75  
-      chomp;
76  
-      s/\s+//;
77  
-      $nofollow{$_} = 1;
78  
-
79  
-      if ($follow{$_}) {
80  
-        $t->destroy_friend($_);
81  
-        delete $follow{$_};
82  
-      }
83  
-    }
84  
-  }
85  
-
86  
-  my %followers;
87  
-
88  
-  for (my $cur = -1, my $r; $cur; $cur = $r->{next_cursor}) {
89  
-    $r = $t->followers({cursor => $cur});
90  
-
91  
-    foreach (@{$r->{users}}) {
92  
-      unless ($nofollow{$_->{screen_name}} or $follow{$_->{screen_name}}) {
93  
-        if ($_->{protected}) {
94  
-          warn "Protected user $_->{screen_name} following\n";
95  
-          warn "Not following back\n";
96  
-          next;
97  
-        }
98  
-        $t->create_friend($_->{screen_name});
99  
-        $follow{$_->{screen_name}} = 1;
100  
-      }
101  
-    }
102  
-  }
103  
-
104  
-  return \%follow;
105  
-}
106  
-
107 51
 sub get_twitter_authorization {
108 52
   print "Visit the following URL in your browser to authorize this app:\n" .
109 53
     $t->get_authorization_url() . "\n";
0  index.tt 100644 → 100755
File mode changed

0 notes on commit bb9552b

Please sign in to comment.
Something went wrong with that request. Please try again.