It is a bad idea to access the slots/properties/members of an object or a pointer to it directly. E.g:
# Bad code obj->my_slot = 5; . . . if (my_obj.my_boolean_slot) { }
Instead, create accessors, readers and writers - see mutator method on the Wikipedia and the class Accessors section of the Perl for Newbies tutorial.