Line | |
---|
1 | #! /bin/env perl |
---|
2 | |
---|
3 | use strict; |
---|
4 | use warnings; |
---|
5 | use Sophie::Client; |
---|
6 | use Getopt::Long; |
---|
7 | use Pod::Usage; |
---|
8 | |
---|
9 | GetOptions( |
---|
10 | 'u=s' => \my $url, |
---|
11 | 'l=s' => \my $login, |
---|
12 | 'p=s' => \my $pass, |
---|
13 | 't=s' => \my $type, |
---|
14 | 'd=s' => \my @options, |
---|
15 | ) or pod2usage; |
---|
16 | |
---|
17 | my %options; |
---|
18 | foreach (@options) { |
---|
19 | m/([^=]+)\s*=\s*(.*)/ or next; |
---|
20 | $options{$1} = $2; |
---|
21 | } |
---|
22 | |
---|
23 | my $sc = Sophie::Client->new( |
---|
24 | server => $url, |
---|
25 | login => $login, |
---|
26 | password => $pass, |
---|
27 | type => $type, |
---|
28 | ); |
---|
29 | |
---|
30 | $sc->run; |
---|
Note: See
TracBrowser
for help on using the repository browser.