Subject: | MIME::Parser::init_parse() partially thwarts the preparations of MIME::Parser::FileUnder::init_parse() |
In MIME::Parser::FileUnder::init_parse() there's the following code:
...
### Remove and re-create the per-message output directory:
...
(-d $self->output_dir) or
mkdir $self->output_dir, 0700 or
die "mkdir ".$self->output_dir.": $!\n";
### Add the per-message output directory to the puregables:
$self->purgeable($self->output_dir);
...
and in MIME::Parser::init_parse() there's the following code:
...
$self->{MP5_Filer}->init_parse();
$self->{MP5_Filer}->purgeable([]); ### just to be safe
...
That is, MIME::Parser::init_parse() calls MIME::Parser::FileUnder::init_parse(), which creates a temporary working directory and records it as "purgeable", and then MIME::Parser::init_parse() continues to clear the "purgeable" list. As a result, the temporary working directory mistakenly doesn't get removed.