in reply to amelinda's HTTP/MIME/file upload/not-a-cgi-but-a-client/minimal-module/perl problem

I realize you said that you can't get someone to install a lot of modules, but libwww-perl is completely self-contained, as nearly as I can tell. And within said bundle would be the perfect module you're looking for, HTML::Form. This will allow you to submit forms, takes care of all the nastiness of making sure the headers are right, was written by Gisle Aas, and is well tested. There's even an example of using it here on the site, Homenode Updater (shameless self plug).

When I was playing with it earlier, I was using it to submit files, also. If you have any possibility of getting someone to install a module, this would be the way to go.

--Chris

e-mail jcwren

Replies are listed 'Best First'.
RE: (jcwren) RE: amelinda's problem
by amelinda (Friar) on Oct 02, 2000 at 20:27 UTC
    I'm afraid I must differ with you on the self-containedness of libwww-perl. From the README:

    In order to install and use this package you will need Perl version 5.004 or better. Some modules within this package depend on other packages that are distributed separately from Perl. We recommend that you have the following packages installed before you install libwww-perl:

    URI
    MIME-Base64
    HTML-Parser
    libnet
    Digest::MD5

    While they say "reccommended," I was unable to install libwww-perl until I had the first three modules above.

    HTML::Form does seem to be a good place to look, though... I'm not sure how I missed it (lack of hierarchical information, perhaps?).

    amelinda

RE: (jcwren) RE: amelinda's problem
by amelinda (Friar) on Oct 02, 2000 at 21:33 UTC
    Further, upon investigating HTML::Form, it does not know how to deal with type "file," only the various text types and radio/check types and the submit types. Unfortunately, that really limits it's applicability to my situation. Come to think about it, it probably limits the applicability of all of LWP/libwww-perl to my problem, certainly if they use HTML::Form to to the submission of forms.

    Has anyone else used LWP to submit a form with the "file" input type? Inquiring minds want to know.

    amelinda