Identically Named Subroutines in Different Invoking Classes

Here are two different functions with the same name but found in different invoking packages:

  sub _profile_subengine {
      my ($self, $dataref, $current) = @_;
      my @record = @{${$dataref}{$current}};
      print <<INSTRUCTOR;
  Instructor Profile for:\t$record[1] $record[0]
      Title:       $record[3]
      Department:  $record[2]
      Phone Ext.:  $record[5]
  INSTRUCTOR
  }
  sub _profile_subengine {
      my ($self, $dataref, $current) = @_;
      my @record = @{${$dataref}{$current}};
      print <<SCHEDULE;
  Profile for Group $current in Room $record[0] at Time Slot $record[1]
      Room:        $record[0]
      Time Slot:   $record[1]
      Group Name:  $record[2]
      Leader:      $record[5]
  SCHEDULE
  }

Previous Back to start of show Next
Slide: 45 mall_polymorphism © 2003 James E. Keenan