projects
/
Net-Vitelity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
correct multiple errors to render code executable
[Net-Vitelity.git]
/
lib
/
Net
/
Vitelity.pm
diff --git
a/lib/Net/Vitelity.pm
b/lib/Net/Vitelity.pm
index
d0ef45e
..
b43818b
100644
(file)
--- a/
lib/Net/Vitelity.pm
+++ b/
lib/Net/Vitelity.pm
@@
-17,6
+17,8
@@
our $VERSION = '0.01';
our $URL = 'http://70.84.157.157/api.php';
our $URL = 'http://70.84.157.157/api.php';
+our $AUTOLOAD;
+
=head1 SYNOPSIS
use Net::Vitelity;
=head1 SYNOPSIS
use Net::Vitelity;
@@
-45,9
+47,9
@@
sub AUTOLOAD {
#XXX md5 encrypt pass
#XXX md5 encrypt pass
- $ua->post($URL, {
+
my $response =
$ua->post($URL, {
login => $self->{login},
login => $self->{login},
- pass => $self
=>{pass}
+ pass => $self
->{pass},
cmd => $cmd,
@_,
}
cmd => $cmd,
@_,
}
@@
-60,8
+62,9
@@
sub AUTOLOAD {
my $content = $response->decoded_content;
#dear vitelity api: why does this make it easier to parse?
my $content = $response->decoded_content;
#dear vitelity api: why does this make it easier to parse?
- $content =~ s/^x\[\[/;
- $content =~ s/\[\[x$/;
+ $content =~ s/^x\[\[//;
+ #$content =~ s/\[\[x$//;
+ $content =~ s/\]\]x$//;
wantarray ? split("\n", $content) : $content;
wantarray ? split("\n", $content) : $content;