How To Get Object’s IOR With OpalORB

If you’re using the Perl CORBA interface, OpalORB, and you want to know how to get a text string representing the IOR of an object you can do the following (where session is the CORBA object I want the IOR of):

my $sior = $session->_get_orb->object_to_string( $session );

This is possible because almost all objects compiled from IDLs in Perl will inherit from the CORBA::Object class which has the _get_orb() method – and this returns a CORBA::ORB class instance which has the object_to_string() method.