| 1 | package Siesta::Plugin::Debounce; | ||||||||||
| 2 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 3 | ▶ | use Siesta::Plugin; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use base 'Siesta::Plugin'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | sub description { | ||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 7 | 1 | "handles bounces/loops."; | |||||||||
| 8 | } | ||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | sub process { | ||||||||
|
Subroutine
process: called CC=3 SCAR=12.7
Pod
documented
| |||||||||||
| 11 | 1 | my $self = shift; | |||||||||
| 12 | 1 | my $mail = shift; | |||||||||
| 13 | |||||||||||
| 14 | 1 | my $post = $self->list->post_address; | |||||||||
| 15 | 1 | for my $been ( $mail->header_set('X-Been-There') ) { | |||||||||
| 16 | 0 | chomp $been; | |||||||||
| 17 | |||||||||||
| 18 | # have we been here before? | ||||||||||
| 19 | 0 | ▶ | return 1 if $been eq $post; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 1 | $mail->header_set( 'X-Been-There', $post ); | |||||||||
| 23 | 1 | return; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 3 | 1; | |||||||||
| 27 | |||||||||||