My Bad Simon. Let me be more clear here.
Code Snippet given by you:
use Netegrity::PolicyMgtAPI;
use Scalar::Util qw(blessed);
$policyapi = Netegrity::PolicyMgtAPI->New();
$session = $policyapi->CreateSession("siteminder", "siteminderadmin");
die "\nFATAL: Cannot create session. Please check admin credentials\n" unless ($session != undef);
$domain = $session->GetDomain("DA");
print $domain->Name(), "->";
$realm = $domain->GetRealm("DA Public");
print $realm->Name(), "->";
$agent = $realm->Agent();
print $agent->Name(), " Type=";
print blessed($agent);
Response:
ERROR - Can't call method "Name" on an undefined value at ./test.pl line 12.
But I do have the Agent Group "DA Agent Group" defined for the Realm I am trying to retrieve.
The Value for $agent->Name() is returning as "undef" though I have value. Can you please help?
Thanks
Gopi Krishna