Tivoli::AccessManager::Admin::Response
use Tivoli::AccessManager::Admin; $resp = Tivoli::AccessManager::Admin::Response->new; $resp->iserror and die $resp->messages; $resp->set_isok(0); $resp->set_message("Line1", "Line2", "Line3"); $resp->set_iswarning(1); $resp->set_value( "foo" ); print $resp->value;
Tivoli::AccessManager::Admin::Response is the general purpose object returned by just about every other method. It handles the response structures returned from the TAM API and provides a fair amount of other manipulations.
Allocates space for the response structure and does the necessary magic to make it work.
None
A fully blessed Tivoli::AccessManager::Admin::Response object.
Retrieves the value stored in the Response object. It is, as you may suspect, a read-only method. As every method in the TAM namespace returns an object of this type, you will likely only use isok more often.
The return should DWYM. It can return a scalar in scalar context, an array in list context and undef otherwise. It tries hard to guess what you meant. If you call it in list context and the response object has an array ref, the right thing happens.
Indicates if the Response object is .. well, okay. If the underlying TAM Response structure has been used, "isok" will return the value of ivadmin_response_isok logically anded with internal isok value. If the structure hasn't been used, "isok" will return the value of its internal isok flag.
I am still not certain that isok = ! error.
True if the flags are so aligned :)
These are read-only methods which return true if the Response object is flagged as an error, warning or informational respectively
True if the response is an error, a warning or informational.
Returns the messages in the Response object. This is a read-only method.
If used in scalar context, only the first message in the message array is returned. If used in array context, the full message array will be returned.
Retrieves the error codes associated with the Response object. This is a read-only method.
If used in scalar context, only the first code in the code array is returned. If used in array context, the full code array will be returned.
Sets the returned value, but does it weirdly.
If you just send a single parameter, the value will be returned when the response object is used in scalar context.
If you send a value and an array reference, the value will be returned in scalar context and the list from the array ref will be returned in list context.
If you send more than two parameters, the entire list is stored and will be returned in list context. Scalar context will give you the number of elements.
Sets the message(s) in the Response object. You can send any number of strings to be included in the message.
The message you want to store.
I honestly have no idea what it returns.
Sets the isok flag to true or false.
Do you want the isok flag to be false or true?
The new value of the isok flag although you will likely never need to actually test the return value
Sets the iswarning flag to false or true.
Do you want the iswarning flag to be false or true?
The new value of the iswarning flag, although you will likely never need to actually test the return value
Do you want the iserror flag to be false or true?
The new value of the iserror flag, although you will likely never need to actually test the return value
See Tivoli::AccessManager::Admin for the list of all the people I am indebted to for their help while writing these modules.
None known yet.
Mik Firestone <mikfire@gmail.com>
Copyright (c) 2004-2011 Mik Firestone. All rights reserved. This program is free software; you can redistibute it and/or modify it under the same terms as Perl itself.
All references to TAM, Tivoli Access Manager, etc are copyrighted by IBM.
To install Tivoli::AccessManager::Admin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tivoli::AccessManager::Admin
CPAN shell
perl -MCPAN -e shell install Tivoli::AccessManager::Admin
For more information on module installation, please visit the detailed CPAN module installation guide.