Hello, vms-perlers!
I have a need to mix Perl and DCL in interesting ways.
I'm processing commands that are being passed to perl. What these
commands are supposed to do could most easily be done in DCL ... it's
a case where running one (written in-house) program will set symbols and
change the default directory used by the next program.
I've been writing perl hooks into our local C functions here, but I'm
afraid I'd have to write a gazillion hooks and duplicate a lot of
functionality to do this all from within perl. It isn't really an
option.
The obvious kludge is to get perl to write a temporary DCL command
file, then execute that file with system(). I'll probably resort to
that for now, but I'm hoping there's a better way.
The ideal, which I guess is probably impossible, is to have some way
of executing DCL commands in the same process context as the perl
process itself. That would allow people to mix perl and DCL pretty
freely ... yeah, it would be great! You could like, _slowly_ migrate
your legacy DCL files over to perl. OK, I'm dreaming.
What I think would probably be possible (for someone to implement,
perhaps not myself) is a DCL interpreter object, with a way for perl
to write into its SYS$INPUT, and read from SYS$OUPUT and SYS$ERROR.
>From what I've read, $CREPRC seems like it could be used to set up
such an object. The I/O confuses me, though. This is where mailboxes
are used, right? I know that if you're not careful, it's very easy to
get into a deadlock situation, so I'm a little nervous about just
jumping in and trying to write this myself ...
Has anyone done something like this already? Does it sound
reasonable? Anyone want to write it for me?
| Forrest Cahoon | [EMAIL PROTECTED] |------------------------------|
| 850 21st Ave SE |----------------------| Only unbalanced people |
| Mpls MN 55414-2514 | | can tip the scales... |