I'm probably missing something obvious, but it's been a while since I played with creating an object.
I want to create a 'linked' type of object, that is one that will respond when a master object has changed. This master object listens to serial data, and will set it's internal structure based on what it sees. so when

$unit= $object->unit_now method equals a value, that means that an activity has taken place with this particular unit.
$object->unit_state($unit) method will give the state of that particular code

So using examples, I can craft up an object package, however I'm unclear how to link in the set method such that it fires when $object->unit_now equals the unit number stored in the object. My rough outline is below, I appreciate any feedback or suggestions object creators may have:

package test_item;

@test_item::ISA = ('Base_Item');

sub initialize
   my ($self,$object,$unit) = @_;

   $$self{unit_number} = $unit;
   $$self{master_object} = $object; #should be a reference to the original object, don't know if this syntax is correct

sub set
   my ($self,$p_state,$p_setby) = @_;

    if (unit_now $self->{master_object} eq $self->{unit_number}) {
       if ($self->{master_object}->unit_state($self->unit_number) =~ /^series1/) {
            $p_state = 'on';
         } elsif ($self->{master_object}->unit_state($self->unit_number) =~ /^series2/) {
            $p_state = 'off';