$obj = $session->create( $objectname );

Similar to the object() call, described in “object” on page 48, the create() call creates an InCharge::object valid reference through which a specified instance can be manipulated. However, unlike object(), the create() method creates the object if it does not already exist.

Since it has the ability to create objects, it is important that the object name specified as an argument includes both the instance name and the class name. You cannot use the ::instance or (undef, $instance) syntaxes for specifying the object name. You can, however, use either the Class::Instance or ($class, $instance) syntax described for the object() method.

Unlike the createInstance() primitive, it is not an error to call the create() method for an object instance that already exists. In this case, the call is equivalent to the $session->object() call and it simply returns the InCharge::object valid reference to the instance.