root/misc/pagerank

Revision 1959 (checked in by miyagawa, 13 years ago)

use Pod::Usage

  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4 use Pod::Usage;
5 use WWW::Google::PageRank;
6
7 my $url = shift @ARGV or pod2usage(1);
8 unless ($url =~ m!^http!) {
9     $url = "http://$url";
10 }
11
12 my $pr = WWW::Google::PageRank->new;
13 print "Page Rank: ", scalar($pr->get($url)) || 0, "\n";
14
15 __END__
16
17 =head1 NAME
18
19 pagerank - Extract PageRank from Google
20
21 =head1 SYNOPSIS
22
23   pagerank URL
24
25 =cut
Note: See TracBrowser for help on using the browser.