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. Advertisements

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,855
    Andrew Thompson
    Oct 29, 2004
  2. B.J.
    Replies:
    4
    Views:
    998
    Toby Inkster
    Apr 23, 2005
  3. Jan Arickx
    Replies:
    0
    Views:
    360
    Jan Arickx
    Aug 25, 2003
  4. Chris Larsen

    Mime::Parser::Filer problemo

    Chris Larsen, Sep 10, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    198
    Chris Larsen
    Sep 10, 2003
  5. joe
    Replies:
    0
    Views:
    363
  6. Replies:
    0
    Views:
    237
  7. afrinspray

    MIME::Parser

    afrinspray, Feb 27, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    156
    afrinspray
    Feb 27, 2006
  8. ecureuil
    Replies:
    0
    Views:
    619
    ecureuil
    May 28, 2006
Loading...