blib/lib/News/GnusFilter.pm untested

filter: Statementstmt 0.0% 0 / 357 Branchbran 0.0% 0 / 172 Conditioncond 0.0% 0 / 67 MC/DCmcdc 0.0% 0 / 42 Subroutinesub 0.0% 0 / 41 Podpod 0.0% 0 / 32 totaltotal 0.0% 0 / 711 CC 87 SCAR 40.4
CC
87
Cov
0%
check_quotes
156.0
mimes
132.0
dns_check
132.0
CRAP 56.8
1 # News::GnusFilter: based on tchrist's msgchk
2 # reworked for Gnus by Joe Schaefer <joe+cpan@sunstarsys.com>
3 # $Id: GnusFilter.pm,v 1.6 2001/09/16 04:39:55 joe Exp $
4  
5 package News::GnusFilter;
6 $VERSION = '0.56';
7  
8 use v5.22;
9 use strict;
10  
11 =head1 NAME
12  
13 News::GnusFilter - package for scoring usenet posts
14  
15 Version: 0.55 ($Revision: 1.6 $)
16  
17 =head1 SYNOPSIS
18  
19 # I<~/.gnusfilter> - scoring script
20  
21 require 5.006;
22 use strict;
23 use News::GnusFilter qw/:tests groan references NSLOOKUP VERBOSE/;
24  
25 NSLOOKUP = ""; # disables nslookups for bogus_address test
26 VERBOSE = 1; # noisier output for debugging
27  
28 my $goof = News::GnusFilter->set_score( {
29 rethreaded => 80,
30 no_context => 60,
31 } );
32  
33 # standard tests - see B<MESSAGE TESTS> for details
34  
35 missing_headers;
36 bogus_address;
37 annoying_subject;
38 cross_post;
39 mimes;
40 lines_too_long;
41 control_characters;
42 miswrapped;
43 misattribution;
44 jeopardy_quoted;
45 check_quotes; # runs multiple tests on quoted paragraphs
46 bad_signature;
47  
48 # custom tests - see B<WRITING HEADERS and SCORING>
49  
50 if (check_quotes and not references) {
51 $goof->{rethreaded} = groan "Callously rethreaded";
52 }
53  
54 if (references and not check_quotes) {
55 $goof->{no_context} = groan "Missing context";
56 }
57  
58 __END__