Embedding Perl into C: Why?

  • Thread starter Frank Iannarilli
  • Start date
F

Frank Iannarilli

Hi,

I've browsed perlembed, the Books (Llama, Camel, Bighorn), the perl
faqs and google-groups -- but still seek more compelling rationale(s)
(versus how-to's) for embedding the Perl interpreter into a C program.
I'm not arguing against it; rather looking for use-case
justifications.

Some possible rationales:

1. Obtain regular expression processing; but why not instead link
against a C regex function library?

2. Endow a C program with scriptable behaviors communicated via
external Perl scripts -- presumably the latter are more readily
prototyped/expressed. The downside might be increased complexity with
structures/logic interwoven among 2 languages.

3. Obtain system-call functionality; but this may be as
readily-obtained and/or as (non)portable as employing the typical
unix/posix system calls.

+++++++++

Might it most often make more sense to "call C from Perl", e.g., via
XS (perlxs)?


Can anybody add to this list and/or add more weight on the "positive"
side of the embedding rationale "scale"?

Cheers!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top