HP3000-L Archives

June 2002, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ken Hirsch <[log in to unmask]>
Reply To:
Ken Hirsch <[log in to unmask]>
Date:
Sun, 30 Jun 2002 18:03:15 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (65 lines)
I've put two new modules on Invent3K and CPAN:
   MPE::Process, which allows you to run a few process intrinsics from Perl,
and the related
  MPE::Spoonfeed, which feeds commands to son processes

MPE::Spoonfeed depends on MPE::Process, MPE::File, and MPE::CIvar

They should be available on CPAN by morning, or on my Invent3K homepage,
http://invent3k.external.hp.com/~KEN.HIRSCH/

Download at:
  http://invent3k.external.hp.com/~KEN.HIRSCH/MPE-Process.tar.gz
  http://invent3k.external.hp.com/~KEN.HIRSCH/MPE-Spoonfeed.tar.gz
Documentation at:
  http://invent3k.external.hp.com/~KEN.HIRSCH/Process.html
  http://invent3k.external.hp.com/~KEN.HIRSCH/Spoonfeed.html

Please give feedback!  These are early versions.  I haven't tested all createprocess
options (e.g. entrypoint).  I might change error-handling a bit in the future.

Ken Hirsch

# *** Process ***
  use MPE::Process;
  MPE::Process->new("CI.PUB.SYS",
                            info => 'echo hi',
    parm => 3,
    loadflag => 1,
    activate=>2)
     or die "Createprocess failed: $MPE::Process::$CreateStatus\n";
  # Only for example purposes: there are easier ways to run CI commands!



  my $proc = MPE::Process->new("QEDIT.PUB.ROBELLE", stdin => "QPROGIN")
     or die "Createprocess failed: $MPE::Process::$CreateStatus\n";
  $proc->activate(2);
  $proc->kill;

#####################################################
# *** Spoonfeed ***
 use MPE::Spoonfeed;
 my $ciproc = MPE::Spoonfeed->new("CI.PUB.SYS", activate=>0)
    or die "Spoonfeed failed: $MPE::Process::CreateStatus\n";
 $ciproc->cmds("ECHO HI", "LISTFILE ./S@,2");
 # Just an example; there are easier ways to run CI commands!

 # QEDIT
  my $qproc =  MPE::Spoonfeed->new("QEDIT.PUB.ROBELLE")
    or die "Spoonfeed failed: $MPE::Process::CreateStatus\n";
  $qproc->cmds("TEXT TESTTEXT", "change 'LARRY'DARRYL' @");
  $qproc->cmds("KEEP ,Y");
  $qproc->cmdsactivate("EXIT") or die "some error message\n";

  # MPEX
  my $mpex =  MPE::Spoonfeed->new("MAIN.PUB.VESOFT",
                                   parm => 3,
                                   autoactivate =>1,
                                   autocmd => "EXIT")
    or die "Spoonfeed failed: $MPE::Process::CreateStatus\n";
  $mpex->cmds("PURGE @.DATA(ACCDATE<TODAY-90);YES");

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2