| 1 | package ThreatNet::Filter::Null; | ||||||||||
| 2 | |||||||||||
| 3 | =pod | ||||||||||
| 4 | |||||||||||
| 5 | =head1 NAME | ||||||||||
| 6 | |||||||||||
| 7 | ThreatNet::Filter::Null - ThreatNet Filter to discard all messages | ||||||||||
| 8 | |||||||||||
| 9 | =head1 DESCRIPTION | ||||||||||
| 10 | |||||||||||
| 11 | The default C<ThreatNet::Filter> object returns true for all messages | ||||||||||
| 12 | passed to its C<keep> method, and can thus be used as a logical "true" | ||||||||||
| 13 | filter object if needed. | ||||||||||
| 14 | |||||||||||
| 15 | C<ThreatNet::Filter::Null> is a utility class which provides the logical | ||||||||||
| 16 | opposite of this. Calls to the C<keep> method for Null filter objects | ||||||||||
| 17 | B<always> return false. | ||||||||||
| 18 | |||||||||||
| 19 | Its the bit bucket of the ThreatNet Filter world. | ||||||||||
| 20 | |||||||||||
| 21 | =head1 METHODS | ||||||||||
| 22 | |||||||||||
| 23 | Methods are as for the parent L<ThreatNet::Filter> class. | ||||||||||
| 24 | |||||||||||
| 25 | =cut | ||||||||||
| 26 | |||||||||||
| 27 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 28 | 2 | ▶ | use Params::Util '_INSTANCE'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 29 | 2 | ▶ | use base 'ThreatNet::Filter'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 30 | |||||||||||
| 31 | 2 | ▶ | use vars qw{$VERSION}; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 32 | 2 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 33 | 2 | $VERSION = '0.20'; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 5 | ▶ | sub keep { | ||||||||
|
Subroutine
keep: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 37 | 5 | ▶ | _INSTANCE($_[1], 'ThreatNet::Message') ? '' : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 2 | 1; | |||||||||
| 41 | |||||||||||
| 42 | =pod | ||||||||||
| 43 | |||||||||||
| 44 | =head1 SUPPORT | ||||||||||
| 45 | |||||||||||
| 46 | All bugs should be filed via the bug tracker at | ||||||||||
| 47 | |||||||||||
| 48 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ThreatNet-Filter> | ||||||||||
| 49 | |||||||||||
| 50 | For other issues, or commercial enhancement and support, contact the author | ||||||||||
| 51 | |||||||||||
| 52 | =head1 AUTHORS | ||||||||||
| 53 | |||||||||||
| 54 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||||||||
| 55 | |||||||||||
| 56 | =head1 SEE ALSO | ||||||||||
| 57 | |||||||||||
| 58 | L<http://ali.as/threatnet/>, L<ThreatNet::Filter> | ||||||||||
| 59 | |||||||||||
| 60 | =head1 COPYRIGHT | ||||||||||
| 61 | |||||||||||
| 62 | Copyright (c) 2005 Adam Kennedy. All rights reserved. | ||||||||||
| 63 | This program is free software; you can redistribute | ||||||||||
| 64 | it and/or modify it under the same terms as Perl itself. | ||||||||||
| 65 | |||||||||||
| 66 | The full text of the license can be found in the | ||||||||||
| 67 | LICENSE file included with this module. | ||||||||||
| 68 | |||||||||||
| 69 | =cut | ||||||||||