IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 15, 2009, 11:32:16 AM (17 years ago)
Author:
jhoblitt
Message:

basic neb-ls tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/neb_distrib_20081210/Nebulous/bin/neb-ls

    r18092 r23875  
    11#!/usr/bin/env perl
    22
    3 # Copyright (C) 2007-2008  Joshua Hoblitt
    4 #
    5 # $Id: neb-ls,v 1.7 2008-06-12 20:03:37 jhoblitt Exp $
     3# Copyright (C) 2007-2009  Joshua Hoblitt
    64
    75use strict;
     
    97
    108use vars qw( $VERSION );
    11 $VERSION = '0.02';
     9$VERSION = '0.03';
    1210
    1311use Nebulous::Client;
     
    1614use Pod::Usage qw( pod2usage );
    1715
    18 my ($server, $long, $recursive);
     16my (
     17    $server,
     18    $long,
     19#    $recursive,
     20);
    1921
    2022$server = $ENV{'NEB_SERVER'} unless $server;
     
    2224GetOptions(
    2325    'server|s=s'    => \$server,
    24     'recursive|r'   => \$recursive,
     26#    'recursive|r'   => \$recursive,
    2527    'l|1'           => \$long,
    2628) || pod2usage( 2 );
     
    3941    unless defined $neb;
    4042
    41 # default to listing everything (bad idea?)
    42 $pattern ||= ".*";
     43# default to listing root
     44$pattern ||= "/";
    4345
    44 if ($recursive) {
    45     $pattern = "^" . $pattern . ".*";
    46 } else {
    47     $pattern = "^" . $pattern . "\$";
    48 }
     46#if ($recursive) {
     47#    $pattern = "^" . $pattern . ".*";
     48#} else {
     49#    $pattern = "^" . $pattern . "\$";
     50#}
    4951
    5052my $keys = $neb->find_objects($pattern);
     
    8688Optional
    8789
    88 =item * --recursive|-r
    89 
    90 By default C<neb-ls> will only try to match the exact string provided to it.
    91 With this option set all keys which match C<<pattern>> as a REGEX or substring
    92 will be returned.
    93 
    94 Optional
    95 
     90=cut
     91#=item * --recursive|-r
     92#
     93#By default C<neb-ls> will only try to match the exact string provided to it.
     94#With this option set all keys which match C<<pattern>> as a REGEX or substring
     95#will be returned.
     96#
     97#Optional
     98#
    9699=item * --server|-s <URL>
    97100
     
    130133=head1 COPYRIGHT
    131134
    132 Copyright (C) 2007-2008  Joshua Hoblitt.  All rights reserved.
     135Copyright (C) 2007-2009  Joshua Hoblitt.  All rights reserved.
    133136
    134137This program is free software; you can redistribute it and/or modify it under
Note: See TracChangeset for help on using the changeset viewer.