Debian Codegraph @

googlism/bin/googlism.pl

raw ◀ ▶
1 Debian patch touch this file
1 #!/usr/local/bin/perl
2
3 eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if 0;
4
5 $VERSION = '0.01';
6
7 =head1 NAME
8
•9 googlism - Search Googlism.com
10
11 =head1 SYNOPSIS
12
•13 B<googlism> query [ type ]
14
15 =head1 DESCRIPTION
16
17 A utility to search http://googlism.com/. Type C<who> is assumed if it is not specified.
18
19 =head1 SEE ALSO
20
21 L<WWW::Search>, L<WWW::Search::Googlism>
22
23 =head1 AUTHOR
24
25 xern <[email protected]>
26
27 =head1 LICENSE
28
29 Released under The Artistic License
30
31 =cut
32
33 use WWW::Search::Googlism;
34 $query = $ARGV[0] ? $ARGV[0] : die;
35 $search = new WWW::Search('Googlism');
36 $search->http_proxy('');
37 $search->native_query(
38 WWW::Search::escape_query($query),
39 { type => ( $ARGV[1] ? $ARGV[1] : 'who') }
40 );
41 while (my $result = $search->next_result()) {
42 print "$result\n";
43 }
44