IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 12, 2008, 12:04:53 PM (18 years ago)
Author:
jhoblitt
Message:

add --timeout option to all ds*ls utilties and other minor doc changes
add the ability to all DataStore::* classes that handle HTTP to pass options directly to LWP::UserAgent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataStore/scripts/dsfilesetls

    r17455 r17637  
    11#!/usr/bin/env perl
    22
    3 # Copyright (C) 2006  Joshua Hoblitt
     3# Copyright (C) 2006-2008  Joshua Hoblitt
    44#
    5 # $Id: dsfilesetls,v 1.6 2008-04-18 23:33:13 jhoblitt Exp $
     5# $Id: dsfilesetls,v 1.7 2008-05-12 22:04:53 jhoblitt Exp $
    66
    77use strict;
     
    1616use Pod::Usage qw( pod2usage );
    1717
    18 my ($uri);
     18my ($uri, $timeout);
    1919
    2020GetOptions(
    2121    'uri|u=s'           => \$uri,
     22    'timeout|t'     => \$timeout,
    2223) or pod2usage( 2 );
    2324
     
    2829) unless defined $uri;
    2930
    30 my $response = DataStore::FileSet->new( uri => $uri )->request;
     31# default http request timeout is 30s
     32$timeout ||= 30;
     33
     34my $response = DataStore::FileSet->new( uri => $uri )->request(
     35        ua_args  => { timeout => $timeout },
     36    );
    3137
    3238die "request failed" unless defined $response;
     
    7682The URI of the file to be retrieved.
    7783
     84=item * --timeout|-t
     85
     86The ammount of time (in seconds) to wait for a response from the DataStore
     87after making an HTTP request.  The default is 30s.
     88
     89Optional.
     90
    7891=back
    7992
     
    92105=head1 COPYRIGHT
    93106
    94 Copyright (C) 2006  Joshua Hoblitt.  All rights reserved.
     107Copyright (C) 2006-2008  Joshua Hoblitt.  All rights reserved.
    95108
    96109This program is free software; you can redistribute it and/or modify it under
     
    112125=head1 SEE ALSO
    113126
    114 L<DataStore>, L<DataStore::FileSet>, L<DataStore::File>
     127L<dsget>, L<dsleech>, L<dsrootls>, L<dsproductls>, L<dsfilesetls>, L<DataStore>
    115128
    116129=cut
Note: See TracChangeset for help on using the changeset viewer.