WWW::USF::Directory - Access to USF's online directory
Version 0.003
# Make a directory object my $directory = WWW::USF::Directory->new(); # Make all searches return only staff $directory->include_faculty(0); $directory->include_staff(1); $directory->include_students(0); # Search for people with the name "Jimmy" foreach my $staff ($directory->search(name => 'Jimmy')) { # Full Name: email@address print $staff->full_name, ': ', $staff->email_address, "\n"; } # This search will also include students foreach my $entry ($directory->search(name => 'Barnes', include_students => 1)) { print $entry->full_name, "\n"; # This search will be in the Tampa campus foreach my $entry ($directory->search(name => 'Williams', campus => 'Tampa')) { print $entry->full_name, "\n"; } # Print out the list of colleges print join "\n", $directory->college_list, q{};
This provides a way in which you can interact with the online directory at the University of South Florida.
This is fully object-oriented, and as such before any method can be used, the constructor needs to be called to create an object to work with.
This will construct a new object.
%attributes is a HASH where the keys are attributes (specified in the "ATTRIBUTES" section).
%attributes
$attributes is a HASHREF where the keys are attributes (specified in the "ATTRIBUTES" section).
$attributes
# Set an attribute $object->attribute_name($new_value); # Get an attribute my $value = $object->attribute_name;
This is the URL that commands are sent to in order to interact with the online directory. This can be a URI object or a string. This will always return a URI object.
This a Boolean of whether or not to include faculty in the search results. The default is true.
This a Boolean of whether or not to include staff in the search results. The default is true.
This a Boolean of whether or not to include students in the search results. The default is false.
This is the user agent that will be used to make the HTTP requests. This internally maps to the user agent in the Net::SAJAX object and the default is the default for Net::SAJAX.
This will return a list of strings that are the names of the campuses.
This will return a list of strings that are the names of the colleges.
This will return a list of strings that are the names of the departments.
This will search the online directory and return an array of WWW::USF::Directory::Entry objects as the results of the search. This method takes a HASH as the argument with the following keys:
This is the string name of the campus to search in. A list of possible entries can be retrieved using "campus_list". The default to to search all campuses.
This is the string name of the college to search in. A list of possible entries can be retrieved using "college_list". The default is to search all colleges.
This is the string name of the department to search in. A list of possible entries can be retrieved using "department_list". The default is to search all departments.
Required. The name of the person to search for.
This a Boolean of whether or not to include faculty in the search results. The default is the value of the "include_faculty" attribute.
This a Boolean of whether or not to include staff in the search results. The default is the value of the "include_staff" attribute.
This a Boolean of whether or not to include students in the search results. The default is the value of the "include_students" attribute.
This module will throw WWW::USF::Directory::Exception objects on errors as well as any upstream exception objects like Net::SAJAX::Exception. This means that all method return values are guaranteed to be correct. Please read the relevant exception classes to find out what objects will be thrown.
WWW::USF::Directory::Exception for general exceptions not in other categories and the base class.
WWW::USF::Directory::Exception::MethodArguments for exceptions related to the values of arguments given to methods.
WWW::USF::Directory::Exception::TooManyResults for searches returning too many results.
WWW::USF::Directory::Exception::UnknownRespose for responses from the server that were not known when the module was written.
HTML::HTML5::Parser 0.101
List::MoreUtils 0.07
Moose 0.89
MooseX::StrictConstructor 0.08
MooseX::Types::URI
Net::SAJAX 0.102
Readonly 1.03
namespace::clean 0.04
Douglas Christopher Wilson, <doug at somethingdoug.com>
<doug at somethingdoug.com>
There are no intended limitations, and so if you find a feature in the USF directory that is not implemented here, please let me know.
Please report any bugs or feature requests to bug-www-usf-directory at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-USF-Directory. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-www-usf-directory at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc WWW::USF::Directory
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-USF-Directory
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/WWW-USF-Directory
CPAN Ratings
http://cpanratings.perl.org/d/WWW-USF-Directory
Search CPAN
http://search.cpan.org/dist/WWW-USF-Directory/
Copyright 2010 Douglas Christopher Wilson, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of either:
the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
the Artistic License version 2.0.
To install WWW::USF::Directory, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::USF::Directory
CPAN shell
perl -MCPAN -e shell install WWW::USF::Directory
For more information on module installation, please visit the detailed CPAN module installation guide.