AcePerl
view release on metacpan or search on metacpan
util/ace.PLS view on Meta::CPAN
#!perl
use Config;
use File::Basename qw(&basename &dirname);
use Cwd;
$origdir = cwd;
chdir dirname($0);
$file = basename($0, '.PLS');
$file .= $^O eq 'VMS' ? '.com' : '.pl';
open OUT,">$file" or die "Can't create $file: $!";
print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl} -w
!GROK!THIS!
# In the following, perl variables are not expanded during extraction.
print OUT <<'!NO!SUBS!';
# Simple interface to acedb.
# Uses readline for command-line editing if available.
use Ace;
use Getopt::Long;
use Text::ParseWords;
use strict vars;
use vars qw/@CLASSES @HELP_TOPICS/;
use constant DEBUG => 0;
my ($HOST,$PORT,$PATH,$TCSH,$URL,$AUTOSAVE,$USER,$PASS,@EXEC);
GetOptions('host=s' => \$HOST,
'port=i' => \$PORT,
'path=s' => \$PATH,
'tcsh' => \$TCSH,
'url' => \$URL,
'login:s' => \$USER,
'user:s' => \$USER,
'password:s' => \$PASS,
'save' => \$AUTOSAVE,
'exec=s' => \@EXEC,
) || die <<USAGE;
Usage: $0 [options] [URL]
Interactive Perl client for ACEDB
Options (can be abbreviated):
-host <hostname> Server host (localhost)
-port <port> Server port (200005)
-path <db path> Local database path (no default)
-url <url> Server URL (see below
-login <user> Username
-pass <pass> Password
-tcsh Use T-shell completion mode
-save Save database updates automatically
-exec <command> Run a command and quit
Respects the environment variables \$ACEDB_HOST and \$ACEDB_PORT, if present.
You can edit the command line using the cursor keys and emacs style
key bindings. Use up and down arrows (or ^P, ^N) to access the history.
The tab key completes partial commands. In tcsh mode, the tab key cycles
among the completions, otherwise pressing the tab key a second time lists
all the possibilities.
You may use multiple -exec switches to run a sequence of commands, or
separate multiple commands in a single string by semicolons:
ace.pl -e 'find Author Thierry-Mieg*' -e 'show'
ace.pl -e 'find Author Thierry-Mieg*; show'
Server URLs:
rpcace://hostname:port RPC server
sace://hostname:port Socket server
tace:/path/to/database Local database
/path/to/database Local database
Usernames can be provided as sace://user\@hostname:port
USAGE
;
( run in 0.854 second using v1.01-cache-2.11-cpan-97f6503c9c8 )