MIME::Parser: How do I get a list of the generated filenames?

Discussion in 'Perl Misc' started by Arvin Portlock, Jun 10, 2006.

  1. Using the MIME::parser module parser->parse_data generates
    a whole bunch of files by default (without extending filer).
    There doesn't seem to be any way to actually get the names
    of the files that it creates.

    I've tried several things. First I tried recommended filename()
    but this has no relation whatsoever to the actual filenames
    that are ultimately generated.

    Last I tried output_path. Seemed very promising but it seems
    to lie:

    my $ent = $parser->parse_data ($msg->stringify);
    foreach my $part ($ent->parts_DFS) {
    my $partpath = $parser->filer->output_path ($part->head);
    print "$pathpath\n";
    }

    c:\out\msg-888-2.dat
    c:\out\msg-888-3.dat
    c:\out\msg-888-4.html
    c:\out\04040101_i-2.gif
    c:\out\040404s3_i-2.gif
    c:\out\04082603_i-2.gif
    c:\out\041130s1_i-2.gif
    c:\out\04123103_i-2.gif

    None of these files exist. There exists a file called msg-888-1.html
    which wasn't reported but no file called msg-888-4.html. I can
    ignore the .dat files but I need to know the other filenames.

    Do I need to create my own filer?

    Arvin
    Arvin Portlock, Jun 10, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CJ
    Replies:
    1
    Views:
    1,566
    Andrew Thompson
    Oct 29, 2004
  2. B.J.
    Replies:
    4
    Views:
    741
    Toby Inkster
    Apr 23, 2005
  3. Jan Arickx
    Replies:
    0
    Views:
    193
    Jan Arickx
    Aug 25, 2003
  4. joe
    Replies:
    0
    Views:
    189
  5. ecureuil
    Replies:
    0
    Views:
    322
    ecureuil
    May 28, 2006
Loading...

Share This Page