diff options
author | Daouda Lo <daouda@mandriva.com> | 2004-09-30 04:05:45 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2004-09-30 04:05:45 +0000 |
commit | 01884649ead863e803ca5d251910f98da39d31d8 (patch) | |
tree | a1a6f819714e184738afb0e30e0031fd4d07a29a /mdkonline.pm | |
parent | 1608b68fe0bfc7d1260453ca26df4c5de06157bc (diff) | |
download | mgaonline-01884649ead863e803ca5d251910f98da39d31d8.tar mgaonline-01884649ead863e803ca5d251910f98da39d31d8.tar.gz mgaonline-01884649ead863e803ca5d251910f98da39d31d8.tar.bz2 mgaonline-01884649ead863e803ca5d251910f98da39d31d8.tar.xz mgaonline-01884649ead863e803ca5d251910f98da39d31d8.zip |
- version system
Diffstat (limited to 'mdkonline.pm')
-rw-r--r-- | mdkonline.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mdkonline.pm b/mdkonline.pm index fd2369ba..ee17c12b 100644 --- a/mdkonline.pm +++ b/mdkonline.pm @@ -12,6 +12,9 @@ use Net::HTTPS; use HTTP::Request::Common; use HTTP::Request; +#Don't change version manually +$::VERSION = '1.1-13mdk'; + sub get_release() { my ($release) = cat_('/etc/mandrake-release') =~ /release\s+(\S+)/; ($release) @@ -20,7 +23,7 @@ sub get_release() { sub get_from_URL { my ($link, $agent_name) = @_; my $ua = LWP::UserAgent->new; - $ua->agent($agent_name . $ua->agent); + $ua->agent($agent_name . $ua->agent . $::VERSION); $ua->env_proxy; my $request = HTTP::Request->new(GET => $link); my $response = $ua->request($request); @@ -48,7 +51,7 @@ sub browser { sub subscribe_online { my ($full_link) = shift; - my $ret = get_from_URL($full_link, "MdkOnlineAgent/1.1"); + my $ret = get_from_URL($full_link, "MdkOnlineAgent/"); my $str; my $result = { 10 => 'OK', @@ -154,7 +157,7 @@ sub send_config { my ($link, $content) = @_; my ($res, $key); my $ua = LWP::UserAgent->new; - $ua->agent("MdkOnlineAgent/0.15" . $ua->agent); + $ua->agent("MdkOnlineAgent" . '/' . $ua->agent . $::VERSION); $ua->env_proxy; my $response = $ua->request(POST $link, Content_Type => 'form-data', |