# Object manager code - privileged context sub message { $object code = "perl code that defines the object behaviour"; %object data = (all the object's member data) $compartment = Safe->new # pass in the object's data $compartment -> share(%object data) # pass in the method to execute $compartment -> share( $message ) # Compile the object, execute the method and return # the $compartment -> reval( $perl code ) return $compartment -> return value }