From: roucherj Date: Tue, 12 Jun 2012 12:20:00 GMT Subject: Re: [PATCH v2] add git credential login to remote mediawiki Message-ID: <964d34b0b5dcdb2e26cac78096629d44@telesun.imag.fr> In-Reply-To: On Tue, 12 Jun 2012 10:44:40 +0200, Simon Perrat wrote: > 2012/6/11 > >> +       if ($op eq "fill") { >> +               while () { >> +                       my ($key, $value) = /([^=]*)=(.*)/; >> +                       # error if key undef >> +                       if (not defined $key) { >> +                               print STDERR "ERROR reciving reponse >> git >> credential fill\n"; > > rec*eiving re*sponse > > Changed it >> +sub ask_login { >> +       run_credential("fill"); >> + >> +       if (!$mediawiki->login( { >> +               lgname => $wiki_login, >> +               lgpassword => $wiki_passwd, >> +               lgdomain => $wiki_domain, >> +               } )) { >> +                       print STDERR "Failed to log in mediawiki >> user >> \"$wiki_login\" on $url\n"; > > Is there a reason for escaping $wiki_login alone ? > Ok, i have changed the message now there is no quotes >> +                       print STDERR "URL:$wiki_domain $url\n"; > > Space after : > Space added >> +                       print STDERR "(error " . >> +                           $mediawiki->{error}->{code} . ': ' . >> +                           $mediawiki->{error}->{details} . ")\n"; > > Broken indentation > indentation changed >> +               if (!$wiki_passwd) { >> +                       #user knows, password not. >> +                       ask_login(); > > know*n (other instances below) > and don't forget space after # ;) > > > Best regards. Space added Thanks