#perl - Wed 28 Mar 2007 between 08:17 and 08:27



abcsubmit_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.
miguelanxois it correct that I have to use quotes around a file descriptor with "use strict"?
abchttp://cpan.uwinnipeg.ca/htdocs/WWW-Myspace/Changes.html
actionCPAN upload: HTML-Dojo-0.0402.0 by CFRANKS
CPANupload: HTML-Dojo-0.0402.0 by CFRANKS
abc??
miguelanxolooks like I have to do so, but only in some places
f00li5habc: www-myspace?
annomiguelanxo: file *descriptor*?
f00li5habc: thanks.
abcno WWW::Mechanize, but www-myspace uses it too and is having the same problem
annoyou mean a perl filehandle?
miguelanxoyep
f00li5hmiguelanxo: nearly never
abci 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.
f00li5habc: i don't understand your question, so we're even
abcare you trying?
jonsmith1982you dont want it to die if the form field doesn't exist?
abci just need to check if the form is the way it should be before i do a $mech->submit_form
miguelanxoif I do $curl->setopt(CURLOPT_COOKIEFILE, MYFH), I have to quote "MYFH"
abcjonsmith1982, no
jonsmith1982, i want it to keep working
annothat's a file handle (file descriptor is something else)
miguelanxoif not, perl does say: Bareword "MYFH" not allowed while "strict subs" in use at ./cliente.pl line 166.
f00li5hmiguelanxo: you need to pass in a globref
or just a glob
annouse \ *MYFH, or use a lexical variable for the handle right away
f00li5hor you could use a lexical file handle
and pass that
open my $foo, '<', 'moose';
miguelanxo:P
so, why is it, that quoting works?
annothat's indirect filehandles
described in open(), i believe
miguelanxook
f00li5hanno: neat.
miguelanxojust 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
f00li5hmiguelanxo: 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
miguelanxoI mean like a module which has subs common to two programs

Page: 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 113 120 

IrcArchive