The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Games::GoogleWhack - Finds, verifies, and/or submits GoogleWhack's

SYNOPSIS

  use Games::GoogleWhack;

  my $googlewhack    = Games::GoogleWhack->new();
  my $is_googlewhack = $googlewhack->is_googlewhack('foo', 'bar');

  die $googlewhack->errstr if $googlewhack->errstr;

  print "You've found a GoogleWhack! Congrats! :-)\n" if $is_googlewhack;

DESCRIPTION

NOTE: THIS MODULE MAKES EXTERNAL CONNECTIONS TO GOOGLE.COM, DICTIONARY.COM, and/or GOOGLEWHACK.COM. IT IS THE USER'S RESPONSIBILITY TO ENSURE THAT THEY ARE IN COMPLIANCE WITH ANY RESPECTIVE TERMS OF USE CLAUSES FOR SITE USAGE. THE AUTHOR ASSUMES NO LIABILITY FOR THE USE OR MISUSE OF THIS SCRIPT.

Public Methods:

new (constructor)

  gets one optional word as an argument that will be used as
  the useragent, ie "Mozilla/5.0"

is_googlewhack

  gets two mandatory words as arguments
  returns true of undef if scalar context (use scalar context
  only if you don't care why it failed if it returns undef),
  and returns results, unlisted words (array ref), and if it's
  a googlewhack in list context

is_in_dictionary

  get one mandatory word as an argument
  returns false w/ error (error is in errstr), false w/o error
  (word is not listed in dictionary.com), or true (word is in
  dictionary)

num_google_results

  gets two mandatory words as arguments
  returns false w/ error (error is in errstr), false w/o error
  (word yielded no results on google), or true (number of google
  results)
           

submit_to_googlewhack

  gets 5 mandatory arguments: word, word, your name, your country,
  your url returns true (added to googlewhack.com's whack stack
  page), false w/ error (error is in errstr), or false w/o error
  (not added to googlewhack.com's whack stack page; may have
  already been added)

errstr

  gets no arguments
  returns either the text of the error that occured or false
  (no error)

See the README for the introduction.

TODO

  Add Memoization
  Add support for googlewhack.com's 3rd rule
  (result page can't be wordlist)

CREDITS

Thanks to Bob O'neill <Oneill.Bob@Grantstreet.com> for bug hunting, beta testing, submission functionality, and various improvements.

AUTHOR

Adam J. Foxson, <afoxson@pobox.com>

SEE ALSO

perl.