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

NAME

WWW::Nextbus::Agency - Superclass for data structures designed for Nextbus website (www.nextbus.com)

SYNOPSIS

  use WWW::Nextbus::Agency::SFMUNI;
  $muniAgency = new WWW::Nextbus::Agency::SFMUNI;
  @stopCodes = $muniAgency->str2stopCodes('N', 'O', 'Duboce and Fillmore');

$stopCodes can now be used as valid GET arguments on the nextbus webpage.

DESCRIPTION

WWW::Nextbus::Agency is conceived as a class of object used by WWW::Nextbus to store and intelligently recall the information that WWW::Nextbus will download from the Nextbus website. It class can also be used by initializing inheriting helper classes that will automatically load up the data relevant for the given agency.

However, the WWW::Nextbus package is not released yet, so the functionality of WWW::Nextbus::Agency is currently limited to the second method. Further, the only helper inheriting class I've written thus far is the class for the San Francisco MUNI agency (sf-muni). This subclass is available as WWW::Nextbus::Agency::SFMUNI.

The "SYNOPSIS" indicates how the object can be used to retrieve the GET argument that the website requires for returning GPS information for a particular stop on a particular route of the sf-muni agency. Once the proper GET code has been retrieved, a web useragent can use the argument to build a URL for the desired information. This is another function that will eventually be provided by WWW::Nextbus by making WWW::Nextbus an LWP::UserAgent.

EXPORT

None by default.

ERROR CHECKING

Watch out! No error checking yet...

REQUIRES

None.

AUTHOR

Peter H. Li<lt>pli9+CODE@spam-guard.itsa.ucsf.edu<gt>

COPYRIGHT

Licensed by Creative Commons http://creativecommons.org/licenses/by-nc-sa/1.0/

SEE ALSO

WWW::Nextbus::Agency::SFMUNI, perl.