| abc | submit_form now properly returns a failure code if it can't load the form, instead of letting WWW::Mechanize choke on it. This hopefully fixes bug#18232, where post_comments can fail with no such field 'f_comments' at /.../WWW/Mechanize.pm line 1178. |
| miguelanxo | is it correct that I have to use quotes around a file descriptor with "use strict"? |
| abc | http://cpan.uwinnipeg.ca/htdocs/WWW-Myspace/Changes.html |
| action | CPAN upload: HTML-Dojo-0.0402.0 by CFRANKS |
| CPAN | upload: HTML-Dojo-0.0402.0 by CFRANKS |
| abc | ?? |
| miguelanxo | looks like I have to do so, but only in some places |
| f00li5h | abc: www-myspace? |
| anno | miguelanxo: file *descriptor*? |
| f00li5h | abc: thanks. |
| abc | no WWW::Mechanize, but www-myspace uses it too and is having the same problem |
| anno | you mean a perl filehandle? |
| miguelanxo | yep |
| f00li5h | miguelanxo: nearly never |
| abc | i don't understand their solution submit_form now properly returns a failure code if it can't load the form, instead of letting WWW::Mechanize choke on it. |
| f00li5h | abc: i don't understand your question, so we're even |
| abc | are you trying? |
| jonsmith1982 | you dont want it to die if the form field doesn't exist? |
| abc | i just need to check if the form is the way it should be before i do a $mech->submit_form |
| miguelanxo | if I do $curl->setopt(CURLOPT_COOKIEFILE, MYFH), I have to quote "MYFH" |
| abc | jonsmith1982, no jonsmith1982, i want it to keep working |
| anno | that's a file handle (file descriptor is something else) |
| miguelanxo | if not, perl does say: Bareword "MYFH" not allowed while "strict subs" in use at ./cliente.pl line 166. |
| f00li5h | miguelanxo: you need to pass in a globref or just a glob |
| anno | use \ *MYFH, or use a lexical variable for the handle right away |
| f00li5h | or you could use a lexical file handle and pass that open my $foo, '<', 'moose'; |
| miguelanxo | :P so, why is it, that quoting works? |
| anno | that's indirect filehandles described in open(), i believe |
| miguelanxo | ok |
| f00li5h | anno: neat. |
| miguelanxo | just another thing: as I'm a mostly C guy, I would like to divide a perl program in modules (common functions, etc...) Do I have to use perl modules for that? they don't seem straightforward to create |
| f00li5h | miguelanxo: what do you mean you just create a file, with the same name, add package Foo::bar to the top, and 1; to the bottom |
| miguelanxo | I mean like a module which has subs common to two programs |