File: googlism.pl

package info (click to toggle)
libwww-search-perl 2.50.80-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,636 kB
  • sloc: perl: 9,723; sh: 132; makefile: 16
file content (44 lines) | stat: -rwxr-xr-x 773 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/local/bin/perl

eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}' if 0;

$VERSION = '0.01';

=head1 NAME

googlism - Search Googlism.com

=head1 SYNOPSIS

B<googlism> query [ type ]

=head1 DESCRIPTION

A utility to search http://googlism.com/. Type C<who> is assumed if it is not specified.

=head1 SEE ALSO

L<WWW::Search>, L<WWW::Search::Googlism>

=head1 AUTHOR

xern <xern@cpan.org>

=head1 LICENSE

Released under The Artistic License

=cut

use WWW::Search::Googlism;
$query = $ARGV[0] ? $ARGV[0] : die;
$search = new WWW::Search('Googlism');
$search->http_proxy('');
$search->native_query(
		    WWW::Search::escape_query($query),
		      { type => ( $ARGV[1] ? $ARGV[1] : 'who') }
		      );
while (my $result = $search->next_result()) {
    print "$result\n";
}