Subject: ANNOUNCE: sperl
From: Salva <[email-masked]>
Date: 26 Sep 1999 19:36:43 GMT
Newsgroups: comp.lang.perl.announce

I just uploaded sperl 1.00 to CPAN

It's a script that lets you run perl scripts in remote machines through
ssh (or rsh).

Its location is:

http://www.perl.com/CPAN/authors/id/S/SA/SALVA/sperl-1.00

This is the documentation for it:

NAME
    sperl - runs perl scripts in remote machines through ssh

SCRIPT CATEGORIES
    Networking UNIX/System_administration Perl/Utilities

README
    sperl is some kind of enhanced perl that lets you work in a
    network environment and run scripts and oneliners in remote
    machines without the need to

USAGE
      $ sperl \
          [-v]                                                \
          [-r<remote command flags>]                          \
          [-R<remote command>]                                \
          [-Q<perl path>]                                     \
          [<usual perl flags>]                                \
          <[<remote user>@]remote_host>[,...]                 \
          [<[<[<user>@]machine>:]script.pl | -e 'perl code'>] \
          [<script args>]

INSTALLATION
    To install sperl, copy it to some place in your path like
    /usr/local/bin/sperl and allow execution of it with `chmod 755
    /your/path/to/sperl'.

    If you want, you can edit the script and change the PERL and
    REMOTE_CMD constants at the beginning to match your real
    environment.

DESCRIPTION
    `sperl' lets you run a locally stored perl script in a remote
    machine for which ssh (or equivalent) access is available.

    It doesn't need any special module installed in local or remote
    machines, just plain perl.

    If there isn't script name in the command line, neither `-e'
    option, sperl will try to read the code form stdin as perl use
    to do.

    It's possible to take the script file from another remote
    machine with the syntax `machine:/path/to/script.pl' or even
    `user@machine:/path/to/script.pl'.

    It's also possible to include several remote host names
    separated by commas and the script will be run in all of them.
    For example `hippo,bugs,[email-masked]'

OPTIONS
    `sperl' accepts the same command line options as `perl' does.
    The options are passed unchanged to the remote perl interpreter
    so some of them like `-S' are nonsense.

    Additionally, it accepts some specific options:

    -r<remote command flags>
        pass options to ssh. For instance `-r-v'

    -R<remote command>
        specify the command to use in place of ssh to connect to the
        remote machine. for instance `-Rrsh'.

    -Q<remote perl path>
        specify the location of the perl interpreter in the remote
        machine. By default, sperl will try to look for the perl
        path in the script first line, if it uses the notation
        `#!/path/to/perl'. As its last resource it expects perl to
        be in the PATH.

    -v  dumps the remote command to stderr before running it. This is
        primary for debugging purposes.

EXAMPLES
      [salvador@hippo:~]$ sperl admin@willy \
       > -e 'print "hello from ".`hostname`'
      hello from willy

      # the -t option force ssh to allocate a new tty...
      [salvador@hippo:~]$ sperl -w -r-t willy -e 'print $count+1,"\n"'
      Use of uninitialized value at (eval 1) line 1.
      1

      # you can even invoke the perl debugger remotely:
      [salvador@hippo:~]$ sperl -d -r-t willy -e 1

      Loading DB routines from perl5db.pl version 1.0401
      Emacs support available.

      Enter h or `h h' for help.

      main::(-e:1):   BEGIN{eval"sub _R{".(pack"h*",shift)."}"}_R(@ARGV)
        DB<1> p `hostname`
      p `hostname`
      willy

        DB<2> ...

      # running the same code in several machines:
      [salvador@hippo:~]$ sperl bugs,willy,hippo -e \
      > 'chomp($h=`hostname`);print "hello from $h!!!\n"'
      hello from bugs!!!
      hello from willy!!!
      hello from hippo!!!

CHANGES
    sperl 1.00     Thu Sep 23 1999
        First public release

BUGS AND LIMITATIONS
    This is a beta release so expect errors in it.

    Lots of spelling errors in the docs... Help me!!!

    The order of the options in the command line is very inflexible.

    Switch parsing for the first line of the script is not very
    clever and it will produce unexpected results if something
    complex is there.

    Scripts with `__END__' or `__DATA__' sections will fail.

    I don't know if there is any possibility to make this to work in
    Microsoft's world.

AUTHOR
    Salvador Fandiño García <[email-masked], [email-masked]>

SEE ALSO
    the perl(1) manpage, the ssh(1) manpage or the rsh(1) manpage,
    the perlrun(1) manpage.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.