cpan-purity is a fairly sweet perl hack I just wrote. Test how much of a the guts of a program comes from sweet, delicious CPAN, and how much is nasty perl code you wrote.
joey@dragon:~>./cpan-purity -- ./cpan-purity usage: cpan-purity [--verbose] [--mine=regexp] -- program args ** CPAN Prurity test results: 98.08% pure CPAN code. ** 7107 lines in 24 files were from CPAN, and 139 lines in 1 files wer +enot. joey@dragon:~>./cpan-purity -- perl -e 'use Coy; die "whups, gotta go. +."' ----- Two rabbits walk. A pair of lovers beside a pool. A trout in the dam. ----- Homer Simpson's commentary... whups, gotta go.. (Sayings of -e: line 1.) ** Looks like that was a perl one-liner.. ** CPAN Prurity test results: 99.98% pure CPAN code. ** 6028 lines in 16 files were from CPAN, and 1 lines in 0 files were +not. joey@dragon:~>./cpan-purity --mine=debconf -- dpkg-preconfigure dpkg-preconfigure: must specify some debs to preconfigure ** CPAN Prurity test results: 70.49% pure CPAN code. ** 6745 lines in 41 files were from CPAN, and 2823 lines in 20 files w +ere not.
Also useful with -v. Enjoy!

Edited by planetscape - removed pre tags, replaced with <code></code> tags

Replies are listed 'Best First'.
Re: CPAN Purity tester
by idsfa (Vicar) on Mar 13, 2006 at 16:10 UTC

    Since the author did not post the code, but just linked to an external server, this CUFP is kinda useless. I /msg'd him requesting that he do so, but got no reply, so I'm posting the code Please vote on the code in the OP's node, not mine ...


    The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon
Re: CPAN Purity tester
by Fletch (Bishop) on Mar 13, 2006 at 13:41 UTC

    Does the extra "r" in "Prurity" stand for "Qruality"? :)