Changeset 26158
- Timestamp:
- Nov 16, 2009, 3:51:29 PM (16 years ago)
- Location:
- trunk/DataStore
- Files:
-
- 10 edited
-
lib/DataStore/File.pm (modified) (2 diffs)
-
lib/DataStore/FileSet.pm (modified) (2 diffs)
-
lib/DataStore/Product.pm (modified) (2 diffs)
-
lib/DataStore/Root.pm (modified) (2 diffs)
-
scripts/dsfilesetls (modified) (3 diffs)
-
scripts/dsget (modified) (5 diffs)
-
scripts/dsgetfileset (modified) (4 diffs)
-
scripts/dsleech (modified) (5 diffs)
-
scripts/dsproductls (modified) (5 diffs)
-
scripts/dsrootls (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/lib/DataStore/File.pm
r17552 r26158 233 233 optional => 1, 234 234 }, 235 no_proxy => { 236 type => SCALAR, 237 optional => 1, 238 }, 235 239 }, 236 240 ); … … 245 249 $ua = LWP::UserAgent->new; 246 250 } 251 252 # load proxy environment variables (if any) 253 if (!$p{no_proxy}) { 254 $ua->env_proxy; 255 } 256 247 257 my $request = HTTP::Request->new(GET => $self->uri); 248 258 my $filename = $p{filename}; -
trunk/DataStore/lib/DataStore/FileSet.pm
r17637 r26158 189 189 { 190 190 ua_args => { 191 optional => 1, 192 }, 193 no_proxy => { 194 type => SCALAR, 191 195 optional => 1, 192 196 }, … … 201 205 $ua = LWP::UserAgent->new; 202 206 } 207 208 if (!$p{no_proxy}) { 209 # load proxy environment variables (if any) 210 $ua->env_proxy; 211 } 212 203 213 my $request = HTTP::Request->new(GET => $self->uri); 204 214 my $response = $ua->request($request); -
trunk/DataStore/lib/DataStore/Product.pm
r17637 r26158 172 172 optional => 1, 173 173 }, 174 no_proxy => { 175 type => SCALAR, 176 optional => 1, 177 }, 174 178 }, 175 179 ); … … 182 186 $ua = LWP::UserAgent->new; 183 187 } 188 189 if (!$p{no_proxy}) { 190 # load proxy environment variables (if any) 191 $ua->env_proxy; 192 } 184 193 185 194 my $request; -
trunk/DataStore/lib/DataStore/Root.pm
r17637 r26158 136 136 optional => 1, 137 137 }, 138 no_proxy => { 139 type => SCALAR, 140 optional => 1, 141 }, 138 142 }, 139 143 ); … … 145 149 } else { 146 150 $ua = LWP::UserAgent->new; 151 } 152 153 if (!$p{no_proxy}) { 154 # load proxy environment variables (if any) 155 $ua->env_proxy; 147 156 } 148 157 -
trunk/DataStore/scripts/dsfilesetls
r17752 r26158 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($uri, $timeout );18 my ($uri, $timeout, $no_proxy); 19 19 20 20 GetOptions( 21 21 'uri|u=s' => \$uri, 22 22 'timeout|t=s' => \$timeout, 23 'no-proxy' => \$no_proxy, 23 24 ) or pod2usage( 2 ); 24 25 … … 31 32 # default http request timeout is 30s 32 33 $timeout ||= 30; 34 $no_proxy = 0 if !defined $no_proxy; 33 35 34 36 my $response = DataStore::FileSet->new( uri => $uri )->request( 35 37 ua_args => { timeout => $timeout }, 38 no_proxy => $no_proxy, 36 39 ); 37 40 … … 91 94 Optional. 92 95 96 =item * --no-proxy 97 98 Do not load proxy environment variables. 99 100 Optional. 101 93 102 =back 94 103 -
trunk/DataStore/scripts/dsget
r25692 r26158 28 28 $timeout, 29 29 @xattrs, 30 $no_proxy, 30 31 ); 31 32 … … 44 45 'timeout|t=s' => \$timeout, 45 46 'xattr|x=s' => \@xattrs, 47 'no-proxy' => \$no_proxy, 46 48 ) or pod2usage( 2 ); 47 49 … … 80 82 # default http request timeout is 30s 81 83 $timeout ||= 30; 84 $no_proxy = 0 if !defined $no_proxy; 82 85 83 86 my %p = ( … … 140 143 filename => $tmpfilename, 141 144 ua_args => { timeout => $timeout }, 145 no_proxy => $no_proxy, 142 146 ); 143 147 … … 302 306 Optional. 303 307 308 =item * --no-proxy 309 310 Do not load proxy environment variables. 311 312 Optional. 313 304 314 =item * --copies <n> 305 315 -
trunk/DataStore/scripts/dsgetfileset
r25574 r26158 17 17 use File::Basename qw( basename ); 18 18 19 my ($uri, $outdir, $timeout, $ verbose);19 my ($uri, $outdir, $timeout, $no_proxy, $verbose); 20 20 21 21 GetOptions( … … 23 23 'outdir|o=s' => \$outdir, 24 24 'timeout|t=s' => \$timeout, 25 'no-proxy' => \$no_proxy, 25 26 'verbose|v' => \$verbose, 26 27 ) or pod2usage( 2 ); … … 34 35 # default http request timeout is 30s 35 36 $timeout ||= 30; 37 $no_proxy = 0 if !defined $no_proxy; 36 38 37 39 my $response = DataStore::FileSet->new( uri => $uri )->request( 38 40 ua_args => { timeout => $timeout }, 41 no_proxy => $no_proxy, 39 42 ); 40 43 … … 117 120 Optional. 118 121 122 =item * --no-proxy 123 124 Do not load proxy environment variables. 125 126 Optional. 127 119 128 =back 120 129 -
trunk/DataStore/scripts/dsleech
r17739 r26158 18 18 use Pod::Usage qw( pod2usage ); 19 19 20 my ($dir, $uri, $last_fileset, $overwrite, $recall, $remember, $verbose, $timeout );20 my ($dir, $uri, $last_fileset, $overwrite, $recall, $remember, $verbose, $timeout, $no_proxy); 21 21 22 22 GetOptions( … … 29 29 'verbose|v' => \$verbose, 30 30 'timeout|t' => \$timeout, 31 'no-proxy' => \$no_proxy, 31 32 ) or pod2usage( 2 ); 32 33 … … 39 40 # default http request timeout is 30s 40 41 $timeout ||= 30; 42 $no_proxy = 0 if !defined $no_proxy; 41 43 42 44 my %p = ( … … 65 67 my $response = DataStore::Product->new(%p)->request( 66 68 ua_args => { timeout => $timeout }, 69 no_proxy => $no_proxy, 67 70 ); 68 71 … … 281 284 Optional. 282 285 286 =item * --no-proxy 287 288 Do not load proxy environment variables. 289 290 Optional. 291 283 292 =back 284 293 -
trunk/DataStore/scripts/dsproductls
r25631 r26158 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($uri, $last_fileset, $timeout, $extra );18 my ($uri, $last_fileset, $timeout, $extra, $no_proxy); 19 19 20 20 GetOptions( … … 22 22 'last_fileset|l=s' => \$last_fileset, 23 23 'timeout|t=s' => \$timeout, 24 'extra|e' => \$extra, 24 'extra|e' => \$extra, 25 'no-proxy' => \$no_proxy, 25 26 ) or pod2usage( 2 ); 26 27 … … 33 34 # default http request timeout is 30s 34 35 $timeout ||= 30; 36 $no_proxy = 0 if !defined $no_proxy; 35 37 36 38 my %p = ( … … 42 44 my $response = DataStore::Product->new(%p)->request( 43 45 ua_args => { timeout => $timeout }, 46 no_proxy => $no_proxy, 44 47 ); 45 48 … … 111 114 Optional. 112 115 116 =item * --no-proxy 117 118 Do not load proxy environment variables. 119 120 Optional. 121 113 122 =back 114 123 -
trunk/DataStore/scripts/dsrootls
r17739 r26158 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($uri, $timeout );18 my ($uri, $timeout, $no_proxy); 19 19 20 20 GetOptions( 21 21 'uri|u=s' => \$uri, 22 22 'timeout|t' => \$timeout, 23 'no-proxy' => \$no_proxy, 23 24 ) or pod2usage( 2 ); 24 25 … … 31 32 # default http request timeout is 30s 32 33 $timeout ||= 30; 34 $no_proxy = 0 if !defined $no_proxy; 33 35 34 36 my %p = ( … … 38 40 my $response = DataStore::Root->new(%p)->request( 39 41 ua_args => { timeout => $timeout }, 42 no_proxy => $no_proxy, 40 43 ); 41 44 … … 93 96 Optional. 94 97 98 =item * --no-proxy 99 100 Do not load proxy environment variables. 101 102 Optional. 103 95 104 =back 96 105
Note:
See TracChangeset
for help on using the changeset viewer.
