Perl::...:McCabe(3pm)
π Perl::...:McCabe(3pm) β the whole vibe π
okay so this is the manual page for Perl::...:McCabe(3pm), and bestie, it's literally all about counting how tangled your code is. no cap. let's get into it β¨
β¨ NAME β¨
Perl::Critic::Utils::McCabe β functions that calculate the McCabe score of source code. that's it, that's the whole name, slay π
πΈ DESCRIPTION πΈ
So this module gives you approximations of McCabe scores. Lowkey iconic. What's a McCabe score tho? It's a number that describes how many possible paths you can take through a set of code β like, the more ways your code can go, the bigger the number, and the bigger the vibe-check-on-your-complexity gets π
The functions in here approximate the McCabe score by summing the number of conditional statements and operators within a set of code. literally just counting the branching bits and adding them up, periodt.
There's some discussion about the McCabe number and other complexity metrics over at <http://en.wikipedia.org/wiki/Cyclomatic_complexity> if you wanna go read it, iykyk π¦
π INTERFACE SUPPORT π
This is considered to be a public module. Which means if anybody ever wants to change its interface, they gotta go through a deprecation cycle first. no surprise-breaking-changes energy here, we respect the process π«Ά
π IMPORTABLE SUBS π
calculate_mccabe_of_sub( $sub )β calculates an approximation of the McCabe number of the code inside aPPI::Statement::Sub. give it a sub, get a number πcalculate_mccabe_of_main( $doc )β calculates an approximation of the McCabe number of all the code in aPPI::Statement::Documentthat is not contained in a subroutine. main character energy only, subs get left out π
π AUTHOR π
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> β thank you for your service, king π
β COPYRIGHT β
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. π
fr fr, that's the whole page. no missing flags, no deleted caveats, we ate and left no crumbs π π
okay bye bestie!! this page dropped with perl v5.42.0 on 2024-10-23 β go forth and measure your complexity, mwah π§π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Perl-Critic 1.156.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms