The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

OpenGuides::UK::PubCrawl - An OpenGuides plugin to generate pub crawls.

DESCRIPTION

Generates pub crawls for OpenGuides installations based in the United Kingdom. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers.

SYNOPSIS

  use CGI::Wiki;
  use CGI::Wiki::Plugin::Locator::UK;
  use OpenGuides::UK::PubCrawl;

  my $wiki = CGI::Wiki->new( ... );
  my $locator = CGI::Wiki::Plugin::Locator::UK->new;
  $wiki->register_plugin( plugin => $locator );
  my $categoriser = CGI::Wiki::Plugin::Categoriser->new;
  $wiki->register_plugin( plugin => $categoriser );

  my $crawler = OpenGuides::UK::PubCrawl->new(
      locator     => $locator,
      categoriser => $categoriser );
  $wiki->register_plugin( plugin => $crawler );
 

METHODS

new
  my $crawler = OpenGuides::UK::PubCrawl->new(
      locator     => $locator,
      categoriser => $categoriser );

  my $crawler = OpenGuides::UK::PubCrawl->new( locator => $locator );

Croaks unless a CGI::Wiki::Plugin::Locator::UK object and a CGI::Wiki::Plugin::Categoriser object are supplied.

locator

Returns locator object.

categoriser

Returns categoriser object.

generate_crawl
  my @crawl = $crawler->generate_crawl( start_location =>
                                            { os_x => 528385,
                                              os_y => 180605  },
                                        max_km_between => 0.5,
                                        num_pubs => 5,
                                        omit => "Ivy House"
                                      );

These are the only options so far. Returns an array of nodenames. num_pubs will default to 5, for the sake of your liver. If it can't find a crawl as long as you asked for, returns the longest one it could find.

AUTHOR

The OpenGuides Project (openguides-dev@openguides.org)

COPYRIGHT

     Copyright (C) 2003 The OpenGuides Project.  All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.