[Bio] / Sprout / Sprout.pm Repository:
ViewVC logotype

Diff of /Sprout/Sprout.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.41, Tue Oct 18 02:24:23 2005 UTC revision 1.43, Tue Oct 18 18:36:26 2005 UTC
# Line 2609  Line 2609 
2609                                      ['HasSSCell(from-link)', 'IsRoleOf(from-link)']);                                      ['HasSSCell(from-link)', 'IsRoleOf(from-link)']);
2610      # Create the return value.      # Create the return value.
2611      my %retVal = ();      my %retVal = ();
2612        # Build a hash to weed out duplicates. Sometimes the same PEG and role appears
2613        # in two spreadsheet cells.
2614        my %dupHash = ();
2615      # Loop through the results, adding them to the hash.      # Loop through the results, adding them to the hash.
2616      for my $record (@subsystems) {      for my $record (@subsystems) {
2617            # Get this subsystem and role.
2618          my ($subsys, $role) = @{$record};          my ($subsys, $role) = @{$record};
2619          if (exists $retVal{$subsys}) {          # Insure it's the first time for both.
2620            my $dupKey = "$subsys\n$role";
2621            if (! exists $dupHash{"$subsys\n$role"}) {
2622                $dupHash{$dupKey} = 1;
2623              push @{$retVal{$subsys}}, $role;              push @{$retVal{$subsys}}, $role;
         } else {  
             $retVal{$subsys} = [$role];  
2624          }          }
2625      }      }
2626      # Return the hash.      # Return the hash.
# Line 3184  Line 3189 
3189      # Declare the return value.      # Declare the return value.
3190      my @retVal = ();      my @retVal = ();
3191      # Check to see if this is a functional assignment.      # Check to see if this is a functional assignment.
3192      my ($user, $type, $function) = split(/\n/, $text);      my ($type, $function) = split(/\n/, $text);
3193      if ($type =~ m/^set ([^ ]+) function to$/i) {      if ($type =~ m/^set ([^ ]+) function to$/i) {
3194          # Here it is, so we return the user name (which is in $1), the functional role text,          # Here it is, so we return the user name (which is in $1), the functional role text,
3195          # and the assigning user.          # and the assigning user.
3196          @retVal = ($1, $function, $user);          @retVal = ($1, $function);
3197      }      }
3198      # Return the result list.      # Return the result list.
3199      return @retVal;      return @retVal;

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.43

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3