| 1 | 1 | ▶ | use 5.014; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||
| 4 | package Mail::Qmail::Filter::Dump; | ||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | our $VERSION = '1.01'; | |||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use Mo qw(coerce required); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | extends 'Mail::Qmail::Filter'; | |||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | has 'to' => required => 1; | |||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||
| 13 | 0 | ▶ | sub filter { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
filter: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | my $message = $self->message; | |||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | ▶ | require Path::Tiny and Path::Tiny->import('path') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
defined &Mail::Qmail::Filter::Dump::path || require Path::Tiny && 'Path::Tiny'->import('path')
require Path::Tiny and "Path::Tiny"->import("path")
MC/DC0%0/3
defined &Mail::Qmail::Filter::Dump::path || require Path::Tiny && 'Path::Tiny'->import('path')
defined &Mail::Qmail::Filter::Dump::path
require Path::Tiny
"Path::Tiny"->import("path")
Truth table0%0/4
A || B and C
A= defined &Mail::Qmail::Filter::Dump::pathB= require Path::TinyC= "Path::Tiny"->import("path")
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | unless defined &path; | ||||||||||||||||||||||||||||||||||||||||||
| 18 | 0 | my $dest = path( $self->to ); | |||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | state $i = 0; | |||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | ▶ | $dest = $dest->child( join '_', $^T, $$, ++$i ) if $dest->is_dir; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 21 | 0 | $dest->spew( $message->body ); | |||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | $self->debug( 'dumped message to' => $dest ); | |||||||||||||||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||
| 27 | __END__ | ||||||||||||||||||||||||||||||||||||||||||