http://qs1969.pair.com?node_id=413087

ryanus has asked for the wisdom of the Perl Monks concerning the following question:

I would like to be able to calculate the Cyclomatic Complexity of some Perl code. After searching Google, there seems to be nothing implemented which calculates this for Perl source code. For those who didn't click the link, Cyclomatic Complexity is a test of source code that generates a number. If this number is high, the code is complex and therefor hard to maintain, prone to errors, and hard to test.

Questions:

  1. Does anyone know of an implementation that will calculte Cyclomatic Complexity for Perl code?
  2. If this does not exist, does anyone know of any language agnostic engines that parsers for Perl parsers could be written for?