Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh and Perl?



Jeff Solomon <jsolomon@xxxxxxxxxxxx> 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.



Messages sorted by: Reverse Date, Date, Thread, Author