Mail-Miner
view release on metacpan or search on metacpan
Miner/Attachment.pm view on Meta::CPAN
print OUT $a->attachment;
close OUT;
}
sub _gen_filename {
my $content_type = shift;
# We're only using this for the generation of file names, so the
# directory we feed it is irrelevant.
my $filer = MIME::Parser::FileInto->new("/tmp");
# This code borrowed from MIME::Parser::Filer
my ($type, $subtype) = split m{/}, $content_type;
$subtype ||= '';
my $ext = ($filer->{MPF_Ext}{"$type/$subtype"} ||
$filer->{MPF_Ext}{"$type/*"} ||
$filer->{MPF_Ext}{"*/*"} ||
".dat");
++$GFileNo;
return "attachment-$$-$GFileNo$ext";
}
sub _namefrom {
( run in 2.242 seconds using v1.01-cache-2.11-cpan-71847e10f99 )