NAME
Bio::CIPRES::Message - A simple message class for the CIPRES API
SYNOPSIS
for my $msg (@{ $job->messages }) {
#$msg is a Bio::CIPRES::Message object
say $msg->text;
say $msg->timestamp->epoch;
say $msg->stage;
}
DESCRIPTION
Bio::CIPRES::Message
is a simple message class for the CIPRES API. Its purpose is to parse the XML message nodes returned by CIPRES and provide an object that can be used in different contexts. In string context it returns a textual summary of the message, and in numeric context it returns the epoch time.
This class is not intended to be used directly by the end user but rather returned by other class methods suchas Bio::CIPRES::Job::messages
.
EXPORTS
METHODS
- new
-
my $msg = Bio::CIPRES::Message->new($node);
Takes an
XML::LibXML
node as the only argument and returns a new class object. Typically not called by the end user. - timestamp
-
my $time = Bio::CIPRES::Message->timestamp;
Returns a
Time::Piece
object representing the timestamp of the message. - stage
-
my $stage = Bio::CIPRES::Message->stage;
Returns a string containing the current stage of the job when the message was generated.
- text
-
my $text = Bio::CIPRES::Message->text;
Returns a string containing the primary text of the message. This is also the value returned by auto-stringification.
CAVEATS AND BUGS
Please reports bugs to the author.
AUTHOR
Jeremy Volkening <jdv@base2bio.com>
COPYRIGHT AND LICENSE
Copyright 2016-2018 Jeremy Volkening
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.