# Task: determine which client specs have the # option 'nocompress'set. # # status: tested on Win/NT using perl 5.6 with p4perl API # num of calls to 'p4': 1 # room for optimization/improvement: add getopts call # # Copyright 2004 Perforce Corporation, Inc. All rights reserved. use P4; my $p4 = new P4; $p4->ParseForms(); $p4->Init() or die "Failed to initialize 'p4' object!"; $p4->Tagged(); #----------------------------------------------------------- # only call to P4: 'p4 clients' #----------------------------------------------------------- $client_tagged_cmd = "$p4 clients"; @ret = $p4->Clients(); # Now, look through each client for the 'options' field, # and see what it's set to. foreach $c (@ret) { $options = $c->{'Options'}; $clientName = $c->{'client'}; if ($options =~ /nocompress/) { print "$clientName: *no* compression of data\n"; } else { print "$clientName: compression of data (default)\n"; } }