Message::Stack::Message - Message!
version 0.22
my $stack = Message::Stack->new; $stack->add( Message::Stack::Message->new( msgid => 'I18NName', level => 'error', scope => 'loginform', subject => 'username', text => 'You forgot a password' ) );
The Message object formalizes the messages that are added to the stack. None of the fields are required, as it's up to the developer to decide what to use.
msgid used to be id. It was renamed to be a bit more description. All the methods that existed for id still exist and the id attribute is now aliased to msgid. In other words if you create an object using id then the msgid methods and the id methods will work, and vice versa.
id
String identifier for this message. Intended for use with gettext or similar I18N mechanisms wherein a message id is used to identity the translated text for a message.
String attribute used to describe the level of this message. Intended for use with strings like 'error' or 'info'.
An optional ArrayRef of params. This is provided for localization of messages, where id may correspond to a Gettext style string and the params may represent some placeholder values.
String identitying the scope of a message. Used for cases when multiple subsystems might be emitting messages and a mechanism for grouping them is necessary. A common case would be a form with multiple fieldsets.
String identifying the subject of a message. Used to identify a particular element to which this message is pertinent. Common case is an individual field in a form.
String containing the human readable form of the message. Often used in situations when I18N is not required.
Returns true if this Message has a msgid.
Returns true if this Message has a level.
Returns true if this Message has params.
Returns true if this Message has a scope.
Returns true if this Message has a subject.
Returns true if this Message has text.
Cory G Watson <gphat@cpan.org>
This software is copyright (c) 2011 by Cory G Watson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Message::Stack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Message::Stack
CPAN shell
perl -MCPAN -e shell install Message::Stack
For more information on module installation, please visit the detailed CPAN module installation guide.