OpenGuides::UK::PubCrawl - An OpenGuides plugin to generate pub crawls.
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.
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 );
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.
CGI::Wiki::Plugin::Locator::UK
CGI::Wiki::Plugin::Categoriser
Returns locator object.
Returns categoriser object.
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.
num_pubs
The OpenGuides Project (openguides-dev@openguides.org)
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.
To install OpenGuides, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenGuides
CPAN shell
perl -MCPAN -e shell install OpenGuides
For more information on module installation, please visit the detailed CPAN module installation guide.