Changeset 17637 for trunk/DataStore/scripts/dsproductls
- Timestamp:
- May 12, 2008, 12:04:53 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/DataStore/scripts/dsproductls (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/scripts/dsproductls
r8707 r17637 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2006 Joshua Hoblitt3 # Copyright (C) 2006-2008 Joshua Hoblitt 4 4 # 5 # $Id: dsproductls,v 1. 3 2006-08-30 22:45:53 jhoblitt Exp $5 # $Id: dsproductls,v 1.4 2008-05-12 22:04:53 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($uri, $last_fileset );18 my ($uri, $last_fileset, $timeout); 19 19 20 20 GetOptions( 21 21 'uri|u=s' => \$uri, 22 22 'last_fileset|l=s' => \$last_fileset, 23 'timeout|t' => \$timeout, 23 24 ) or pod2usage( 2 ); 24 25 … … 29 30 ) unless defined $uri; 30 31 32 # default http request timeout is 30s 33 $timeout ||= 30; 34 31 35 my %p = ( 32 36 uri => $uri, … … 35 39 $p{last_fileset} = $last_fileset if defined $last_fileset; 36 40 37 my $response = DataStore::Product->new(%p)->request; 41 my $response = DataStore::Product->new(%p)->request( 42 ua_args => { timeout => $timeout }, 43 ); 38 44 39 45 die "request failed" unless defined $response; … … 82 88 This flag is optional. 83 89 90 =item * --timeout|-t 91 92 The ammount of time (in seconds) to wait for a response from the DataStore 93 after making an HTTP request. The default is 30s. 94 95 Optional. 96 84 97 =back 85 98 … … 98 111 =head1 COPYRIGHT 99 112 100 Copyright (C) 2006 Joshua Hoblitt. All rights reserved.113 Copyright (C) 2006-2008 Joshua Hoblitt. All rights reserved. 101 114 102 115 This program is free software; you can redistribute it and/or modify it under … … 118 131 =head1 SEE ALSO 119 132 120 L< DataStore>, L<DataStore::Product>, L<DataStore::FileSet>133 L<dsget>, L<dsleech>, L<dsrootls>, L<dsproductls>, L<dsfilesetls>, L<DataStore> 121 134 122 135 =cut
Note:
See TracChangeset
for help on using the changeset viewer.
