develooper Front page | perl.perl5.porters | Postings from August 2011

Perl interpret as a bash builtin question

Thread Next
From:
Patrick Galbraith
Date:
August 30, 2011 19:50
Subject:
Perl interpret as a bash builtin question
Message ID:
CAM=bBLKgE-psNvP8XMKRjjRtmSKfSEpn_KBv-JXiy1L+bMD=GQ@mail.gmail.com
Hi all!

I have a project a client is trying to implement that I'm working with
them on. It was suggested that I ask my question here.

The project is that they want to have a bash builtin that is a Perl
interpreter. The idea being that they don't have to spawn separate
processes for Perl, no startup cost.

They do have this simple perl interpreter they built that does is
enabled as a bash builtin, it works fine for straight perl calls, but
when they include a perl module that is itself a C/XS perl module,
even something as simple as Env::C, it segfaults, unless of course
they do LD_PRELOAD=/path/to/libperl.so bash script_with_builtin_call.
That works, but they don't want to have the requirement of LD_PRELOAD

Have you ever heard of such a project? One way of maybe getting this
to work is to link bash to libperl.so, but even if I build bash linked
to perl, ldd doesn't show it as linked.

So, the crux of the question is: how does mod_perl do it? Mod_perl has
to be able to interpret code that loads other C-modules in turn. Is
this something that needs to be linked into Apache, or just the
interpreter?

Thanks for any tips or advice!

Regards,

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About