From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6194 invoked from network); 4 Aug 1999 22:03:28 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Aug 1999 22:03:28 -0000 Received: (qmail 26474 invoked by alias); 4 Aug 1999 22:03:17 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7360 Received: (qmail 26467 invoked from network); 4 Aug 1999 22:03:16 -0000 To: Jeff Solomon Cc: zsh-workers@sunsite.auc.dk Subject: Re: Zsh and Perl? References: <14248.30740.258799.3140@mrclean.Stanford.EDU> From: Bruce Stephens Date: 04 Aug 1999 23:02:19 +0100 In-Reply-To: Jeff Solomon's message of "Wed, 4 Aug 1999 11:13:27 -0700 (PDT)" Message-ID: User-Agent: Gnus/5.070095 (Pterodactyl Gnus v0.95) XEmacs/21.1 (Arches) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Jeff Solomon writes: [...] > So I'm asking the zsh developers about the best way to solve this > problem. Basically I want to either embed perl into zsh or embed zsh > into perl, but the key is that my perl commands have to share state > from one instance of a perl interpreter. Why do you need Perl? What do you need to do that can't be done in zsh? (I'm not doubting that there are things that Perl can do that zsh can't, but perhaps the things you want to be able to do would be valuable and sensible to add to zsh.) > Embed perl into zsh: > > Looking at the source, this looks like the most straightforward > thing to do. It seems easy to add a 'perl_eval' command that would > evaluate a snippet of perl in a persistent interpreter. But I > would want to add command into the zsh enviroment from perl so I > can type: > > my_command my_arg1 my_arg2 > > instead of > > perl_eval 'my_command my_arg1 my_arg2' > > which means you'd have to add support for calling back into zsh > from perl. Yes, this sort of thing has been proposed before. I'm not sure whether there was ever actual code, but I don't think there's any serious barrier to having a Perl module, dynamically loadable into zsh.