September 04 2015 compare-git-versions Back

Refactoring: Workflow

        sub _calculate_hash_intersection {
            my $xintersectionref = shift;
            my @xkeys = keys %{$xintersectionref};

            my %intersection = %{${$xintersectionref}{$xkeys[0]}};

            for (my $m = 1; $m <= $#xkeys; $m++) {

                my %compare = %{${$xintersectionref}{$xkeys[$m]}};

                my %result = ();
                foreach (keys %compare) {
                    $result{$_}++ if (exists $intersection{$_});
                }
                %intersection = %result;
            }
            return \%intersection;
        }


Home Last TOC Copyright © 2015 James E Keenan Back Next