Mercurial > eagle-eye
comparison Ikariam.pm @ 9:ae412d1f7761
added logout function.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Wed, 08 Oct 2008 04:30:32 +0800 |
parents | e4b3168d0319 |
children | f590b5ea5e55 |
comparison
equal
deleted
inserted
replaced
8:e4b3168d0319 | 9:ae412d1f7761 |
---|---|
207 } | 207 } |
208 | 208 |
209 return @cities; | 209 return @cities; |
210 } | 210 } |
211 | 211 |
212 sub logout | |
213 { | |
214 my $self = shift; | |
215 $self->{mech}->get(sprintf('http://%s/index.php?action=loginAvatar&function=logout', $self->{server})); | |
216 } | |
217 | |
212 sub login | 218 sub login |
213 { | 219 { |
214 my $self = shift; | 220 my $self = shift; |
215 | 221 |
216 # $self->{mech}->get(sprintf('http://%s/', $self->{server})); | |
217 my $res = $self->{mech}->post(sprintf("http://%s/index.php?action=loginAvatar&function=login", $self->{server}), [ | 222 my $res = $self->{mech}->post(sprintf("http://%s/index.php?action=loginAvatar&function=login", $self->{server}), [ |
218 name => $self->{user}, | 223 name => $self->{user}, |
219 password => $self->{pass}, | 224 password => $self->{pass}, |
220 ]); | 225 ]); |
221 my $c; | 226 my $c; |