WWW::Nextbus::Agency - Superclass for data structures designed for Nextbus website (www.nextbus.com)
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.
$stopCodes
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.
None by default.
Watch out! No error checking yet...
None.
Peter H. Li<lt>pli9+CODE@spam-guard.itsa.ucsf.edu<gt>
Licensed by Creative Commons http://creativecommons.org/licenses/by-nc-sa/1.0/
WWW::Nextbus::Agency::SFMUNI, perl.
To install WWW::Nextbus::Agency, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Nextbus::Agency
CPAN shell
perl -MCPAN -e shell install WWW::Nextbus::Agency
For more information on module installation, please visit the detailed CPAN module installation guide.