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

NAME

Black::Board::Publisher - Publisher object for Black::Board, dispatches to Topic subscribers

VERSION

version 0.0001

DESCRIPTION

This is the Publisher object for Black::Board. It contains a list of Topic objects. The Publisher object takes care of this list of Topic objects, it handles dispatching to them and provides methods to add and remove topics.

ATTRIBUTES

topics

Contains a "TYPES/TopicList" in Black::Board::Types registered to this publisher. A TopicList is an array reference of Topic objects.

METHODS

has_topics

Returns the number of topics registered to this publisher.

add_topic

Registers the specified Black::Board::Topic object to this publisher.

topic_list

Returns a list of Black::Board::Topic objects registered to this publisher.

first_topic

Perform a first() operation on topics.

remove_topic

Only argument is a "TYPES/TopicName" in Black::Board::Types. Removes the given TopicName from this publishers list of topics.

get_topic

Given a TopicName, returns a Topic object if found, undefined otherwise.

publish

Takes a "TYPES/Topic" in Black::Board::Types and a "TYPES/Message" in Black::Board::Types. The message is dispatched to the subscribers of the topic. The final message returned by the subscriber is returned.

SEE ALSO

AUTHOR

Scott Beck <sabeck@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Scott Beck <sabeck@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.