The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Analizo::Metric::AfferentConnections - Afferent Connections per Class (ACC) metric

DESCRIPTION

The metric calculation is based on the following article and calculates the class conectivity.

Article: Monitoring of source code metrics in open source projects by Paulo Roberto Miranda Meirelles.

See the adaptation of the paragraph about Afferente Connections per Class in the article:

Measures the connectivity of a class. If a class Cc access a method or attribute of a class Cs, consider Cc a client of the supplier class Cs, denoting Cc => Cs. Consider the follow function:

  client(Ci, Cj) = 1, if (Ci => Cj) and (Ci != Cj)
  client(Ci, Cj) = 0, otherwise.

So ACC(C) = (sum(client(Ci, Cj)), i = 1 to N), where N is the total number of system classes. If the value of this metric is large, a change in the class has substantially more side effects, making maintenance more difficult.