WWW::USF::Directory::Entry::Affiliation - Information about an affiliation of


WWW-USF-Directory documentation  | view source Contained in the WWW-USF-Directory distribution.

Index


NAME

Top

WWW::USF::Directory::Entry::Affiliation - Information about an affiliation of an entry

VERSION

Top

Version 0.003

SYNOPSIS

Top

  # Print the afflilation
  say $affiliation;

  # Does the affiliation have a department?
  say $affiliation->has_department ? 'yes' : 'no';

DESCRIPTION

Top

Information about an affiliation of an entry. These objects are typically created by WWW::USF::Directory.

CONSTRUCTOR

Top

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.

new

This will construct a new object.

new(%attributes)

%attributes is a HASH where the keys are attributes (specified in the ATTRIBUTES section).

new($attributes)

$attributes is a HASHREF where the keys are attributes (specified in the ATTRIBUTES section).

new($role_department_string)

This is a special case where the $role_department_string is a string that came from the directory page in the format role \s+ : \s+ department.

ATTRIBUTES

Top

department

This is the department in which the affiliation applies.

role

Required. This is the role of the affiliation.

METHODS

Top

stringify

This method is used to return a string that will be given when this object is used in a string context. This returns "role: department" or "role".

  my $affiliation = WWW::USF::Directory::Entry::Affiliation->new(
      role       => 'My Role'
      department => 'Department'
  );

  say $affiliation; # Prints "My Role: Department"

DEPENDENCIES

Top

* Moose 0.89
* MooseX::StrictConstructor 0.08
* namespace::clean 0.04

AUTHOR

Top

Douglas Christopher Wilson, <doug at somethingdoug.com>

BUGS AND LIMITATIONS

Top

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.

I highly encourage the submission of bugs and enhancements to my modules.

LICENSE AND COPYRIGHT

Top


WWW-USF-Directory documentation  | view source Contained in the WWW-USF-Directory distribution.