$obj = UaTk->new();
$obj->RegisterCmdHandler(\&modify_handler,"MODIFY");
#
# modify_handler - prints all attributes passed to it.
#
sub modify_handler {
my ($attr_list) = @_;
local ($attr,$flag,$ver,$value);
printf STDERR "\n---> In Modify Handler!";
if ($obj->GetRecordType() eq "USER") {
foreach (keys %$attr_list) {
$value = $obj->GetAttributeValue($_);
$ver = $obj->GetAttributeVersion($_);
$flag = $obj->GetAttributeChange($_);
printf STDERR "\n\tAttr Key: $_ Value: $value
Version: $ver Change: $flag";
}
}
$obj->Exit(); # Tell UaTk to exit
}
#----- Main -----
#-- Set log level to highest level.
$obj->SetDebugLevel(4);
if ($obj->UaTkMain() == 0) {
printf STDERR "\nUaTkMain completed sucessfully.";
} else {
printf STDERR "\nUaTkMain completed with errors.";
printf STDERR "\nPlease check log file UaTk.log.\n";
}
exit;
Using Toolkit Applications with Profiles
When working with profiles containing toolkit application attributes,
you must consider the following things:
1. Creating, editing, moving, copying, and deleting user records will
work just like any other endpoint type supplied as a standard for
Tivoli SecureWay User Administration.
2. Merging a toolkit application will work just like any other
endpoint type ONLY IF you do not map your applications login
attribute to a pre-existing login attribute for another endpoint
type. If you do so, the merging of user records will fail.
3. You can only populate toolkit application user records using the
wpopusrs command or the Populate Profile dialog accessed
Developing Your Application in Perl
73
Tivoli® SecureWay Application Management Toolkit Guide