Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove unused autofollow() subroutine.

  • Loading branch information...
commit bb9552bb62a73aa573a704ba6ad6970c88309a5d 1 parent 1060c9c
Dave Cross authored
Showing with 0 additions and 56 deletions.
  1. +0 −56 build.pl
  2. 0  index.tt
56 build.pl
View
@@ -48,62 +48,6 @@
{binmode => ':utf8'})
or die $tt->error;
-sub autofollow {
- my $t = shift;
-
- my %follow;
-
- for (my $cur = -1, my $r; $cur; $cur = $r->{next_cursor}) {
- $r = $t->friends({cursor => $cur});
-
- foreach (@{$r->{users}}) {
- $follow{$_->{screen_name}} = 1;
- }
- }
-
-# unless ($follow) {
-# warn scalar localtime() . "\n";
-# warn $t->http_message . "\n";
-# warn $t->{_twitter_error}{error} . "\n";
-# return;
-# }
-
- my %nofollow;
- if (-e 'nofollow') {
- open my $nf, '<', 'nofollow' or die $!;
- while (<$nf>) {
- chomp;
- s/\s+//;
- $nofollow{$_} = 1;
-
- if ($follow{$_}) {
- $t->destroy_friend($_);
- delete $follow{$_};
- }
- }
- }
-
- my %followers;
-
- for (my $cur = -1, my $r; $cur; $cur = $r->{next_cursor}) {
- $r = $t->followers({cursor => $cur});
-
- foreach (@{$r->{users}}) {
- unless ($nofollow{$_->{screen_name}} or $follow{$_->{screen_name}}) {
- if ($_->{protected}) {
- warn "Protected user $_->{screen_name} following\n";
- warn "Not following back\n";
- next;
- }
- $t->create_friend($_->{screen_name});
- $follow{$_->{screen_name}} = 1;
- }
- }
- }
-
- return \%follow;
-}
-
sub get_twitter_authorization {
print "Visit the following URL in your browser to authorize this app:\n" .
$t->get_authorization_url() . "\n";
0  index.tt 100644 → 100755
View
File mode changed
Please sign in to comment.
Something went wrong with that request. Please try again.