From 580cd62f0a4fac5dba37a8a152afaecd99e8c767 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Thu, 15 Dec 2011 20:07:48 -0500 Subject: removed old libraries - depends on openid_api now --- .../openid-php-openid-782224d/admin/longlines.pl | 46 ---------------------- 1 file changed, 46 deletions(-) delete mode 100644 models/openid-php-openid-782224d/admin/longlines.pl (limited to 'models/openid-php-openid-782224d/admin/longlines.pl') diff --git a/models/openid-php-openid-782224d/admin/longlines.pl b/models/openid-php-openid-782224d/admin/longlines.pl deleted file mode 100644 index 6ce65e87a..000000000 --- a/models/openid-php-openid-782224d/admin/longlines.pl +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env perl -w - -use strict; - -my $filename = $ARGV[0]; - -if (!$filename) { - print "Usage: longlines.pl [length]\n"; - exit(1); -} - -# Set a default maximum line length. -my $max_length = $ARGV[1] || 80; - -my @lines = (); -my $line_num = 0; - -open(HANDLE, "<", $filename) or die "Cannot open $filename\n"; - -# Read the file and track the lines with length > $max_length. -while () { - $line_num++; - # Subtract one because the newline doesn't count toward the - # length. - if (length($_) - 1 > $max_length) { - push @lines, $line_num; - } -} - -# If more than five long lines were found, truncate to five and -# indicate that others were present, too. -if (@lines > 5) { - @lines = @lines[0..4]; - push @lines, "and others"; -} - -# If any long lines were found, notify and exit(1); otherwise, -# exit(0). -if (@lines) { - print $filename." (line".((@lines > 1) ? "s" : "")." ". - join(", ", @lines)." exceed".((@lines == 1) ? "s" : ""). - " length $max_length)\n"; - exit(1); -} else { - exit(0); -} -- cgit v1.2.3