From: Jeff S. <lea...@fr...> - 2007-03-22 20:55:51
|
On Thu, 22 Mar 2007, Grahame Jordan wrote: > I am wondering how to upload a binary file via http to the gumstix. I > have written some part of a perl script but cannot seem to get the file > itself. I am getting nothing in $buffer. What do I need to do?? > Also, do I need CGI.pm and how do I install CGI.pm in the build_root? This may or may not work (it passes the "microperl -e 'use CGI'" test): build microperl and load it on your gumstix. now transfer the following files/directories from your microperl buildroot to a "central" directory like /usr/lib/perl5 on your gumstix: Carp/ Carp.pm CGI/ CGI.pm constant.pm Exporter/ Exporter.pm overload.pm strict.pm vars.pm warnings/ warnings.pm You may have to fiddle with @INC to add this directory of code so microperl picks it up. Note: because you can delay the loading of modules beyond the compile phase (through the do {} and require {} constructs), you may get warnings about additional modules needed to run your code You may also find CGI doesn't work exactly as planned because microperl is, well, micro and a lot of the OS-specific stuff is stripped out. you'll have to experiment to find what works and what doesn't. Modules that require compilation of C code (XS modules) won't work with microperl since the dynaloader isn't built in to it. The doc for CGI is: http://perldoc.perl.org/CGI.html A good book is "CGI Programming with Perl". Otherwise, there is Google. --Jeff "I am not available for comment" |