| WWW-USF-Directory documentation | Contained in the WWW-USF-Directory distribution. |
WWW::USF::Directory::Entry - An entry in the USF online directory
Version 0.003
# Print the family name say $entry->family_name;
This represents an entry in the USF online directory. These objects are typically created by WWW::USF::Directory.
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 is a HASHREF where the keys are attributes (specified in the
ATTRIBUTES section).
# Set an attribute $object->attribute_name($new_value); # Get an attribute my $value = $object->attribute_name;
This is the list of affiliations to USF as WWW::USF::Directory::Entry::Affiliation objects.
This is the campus the entry is affiliated with.
This is the mailstop for he entry on campus.
This is the campus phone number.
This is the college the entry is affiliated with.
This is the e-mail address.
This is the family name.
This is the first name.
This is the given name.
This is the middle name.
This will return the full name, which is the given name and the family name joined with a space.
This returns a Boolean of if the campus attribute is set.
This returns a Boolean of if the campus_mailstop attribute is set.
This returns a Boolean of if the campus_phone attribute is set.
This returns a Boolean of if the college attribute is set.
This returns a Boolean of if the email attribute is set.
This returns a Boolean of if the middle_name attribute is set.
Douglas Christopher Wilson, <doug at somethingdoug.com>
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.
You can find documentation for this module with the perldoc command.
perldoc WWW::USF::Directory
You can also look for information at:
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:
| WWW-USF-Directory documentation | Contained in the WWW-USF-Directory distribution. |
package WWW::USF::Directory::Entry; use 5.008001; use strict; use warnings 'all'; ########################################################################### # METADATA our $AUTHORITY = 'cpan:DOUGDUDE'; our $VERSION = '0.003'; ########################################################################### # MOOSE use Moose 0.89; use MooseX::StrictConstructor 0.08; ########################################################################### # MOOSE TYPES use MooseX::Types::Common::String qw( NonEmptySimpleStr ); use MooseX::Types::Email qw( EmailAddress ); ########################################################################### # ALL IMPORTS BEFORE THIS WILL BE ERASED use namespace::clean 0.04 -except => [qw(meta)]; ########################################################################### # ATTRIBUTES has 'affiliations' => ( is => 'ro', isa => 'ArrayRef[WWW::USF::Directory::Entry::Affiliation]', default => sub { [] }, documentation => q{This is the list of affiliations to USF}, ); has 'campus' => ( is => 'ro', isa => NonEmptySimpleStr, documentation => q{This is the campus the entry is affiliated with}, clearer => '_clear_campus', predicate => 'has_campus', ); has 'campus_mailstop' => ( is => 'ro', isa => NonEmptySimpleStr, documentation => q{This is the mailstop for he entry on campus}, clearer => '_clear_campus_mailstop', predicate => 'has_campus_mailstop', ); has 'campus_phone' => ( is => 'ro', isa => NonEmptySimpleStr, documentation => q{This is the campus phone number}, clearer => '_clear_campus_phone', predicate => 'has_campus_phone', ); has 'college' => ( is => 'ro', isa => NonEmptySimpleStr, documentation => q{This is the college the entry is affiliated with}, clearer => '_clear_college', predicate => 'has_college', ); has 'email' => ( is => 'ro', isa => EmailAddress, documentation => q{This is the e-mail address}, clearer => '_clear_email', predicate => 'has_email', ); has 'family_name' => ( is => 'ro', isa => NonEmptySimpleStr, documentation => q{This is the family name}, required => 1, ); has 'first_name' => ( is => 'ro', isa => NonEmptySimpleStr, documentation => q{This is the first name}, required => 1, ); has 'given_name' => ( is => 'ro', isa => NonEmptySimpleStr, documentation => q{This is the given name}, required => 1, ); has 'middle_name' => ( is => 'ro', isa => NonEmptySimpleStr, documentation => q{This is the middle name}, clearer => '_clear_middle_name', predicate => 'has_middle_name', ); ########################################################################### # METHODS sub full_name { my ($self) = @_; # The full name is the given name and family name return join q{ }, $self->given_name, $self->family_name; } ########################################################################### # MAKE MOOSE OBJECT IMMUTABLE __PACKAGE__->meta->make_immutable; 1; __END__