in reply to Mime::parse file output

According to the docs, you can use $parser->tmp_dir("/my/custom/tmpdir"); to manually set a temp directory. Otherwise, the system default temporary directory is used.

edit: Just realized you were asking about output directory, not temp directory. It looks like you might be able to use $parser->output_dir("/tmp"); instead of $parser->output_under("/tmp"); to output everything in the same directory if that works for you.

Replies are listed 'Best First'.
Re^2: Mime::parse file output
by SneakZa (Initiate) on Jun 09, 2013 at 16:07 UTC
    thats not what im looking for.. i would like to know what that random directory is for later use,, cause there might be multiple sessions of this script running , so everytime it parses a message it creates /tmp/msg-*something and the parts are saved in there..

      Do you need them to be filed in random subdirectories inside a specified directory (rather than everything directly in the specified directory)? If not, then what I said in the edit still stands.

      output_dir
      Causes messages to be filed directly into the given DIRECTORY. It does this by setting the underlying filer() to a new instance of MIME::Parser::FileInto, and passing the arguments into that class' new() method.
      output_under
      Causes messages to be filed directly into subdirectories of the given BASEDIR, one subdirectory per message. It does this by setting the underlying filer() to a new instance of MIME::Parser::FileUnder, and passing the arguments into that class' new() method.