eff_i_g has asked for the wisdom of the Perl Monks concerning the following question:

Monks,

A  perl -v  tells me:
This is perl, version 5.003 with EMBED
What's the significance of "with EMBED"?

I'm trying to figure this out because we're moving programs to a new server and we want to match versions where we can. Googling isn't working because it picks up things like "Hi, I'm working with embedded (?:graphics|flash|images|you name it)."

Explanations appreciated; Thanks.

Replies are listed 'Best First'.
Re: Perl "with EMBED" (ancient)
by tye (Sage) on Oct 17, 2007 at 15:04 UTC

    When you asked this in the chatterbox, you should have mentioned "5.003", because then you would have gotten an answer. None of us realized you were talking about such an antique.

    http://search.cpan.org/grep?release=perl5.003_07&string=EMBED&n=1

    Which mostly points to Changes5.003 which says:

    The EMBED namespace changes are now used by default, in order to better segregate Perl's C global symbols from those belonging to embedding applications or to libraries. This makes it necessary to rebuild dynamic extensions built under previous versions of Perl without the EMBED option. The default use of EMBED can be overridden by placing -DNO_EMBED on the cc command line.

    The EMBED change is the beginning of a general cleanup of C global symbols used by Perl, so binary compatibility with previously compiled dynamic extensions may be broken again in the next few releases.

    - tye        

Re: Perl "with EMBED"
by eff_i_g (Curate) on Oct 17, 2007 at 15:15 UTC
    Sorry about that tye. Does this antique have any value? :)

    I still do no fully understand what this is; I'm assuming it's in regards to embedding Perl into others things, but not other things into Perl? In either case, the code using this version is very trivial, so I'm assuming it really doesn't matter. (Although, it does mention that "EMBEDDING is on by default.")

      EMBED has no run-time penalty, but helps keep the Perl namespace from colliding with that used by other libraries pulled in by extensions or by embedding perl. Allow a cc -DNO_EMBED override, however, to keep binary compatability with previous versions of perl.

      Sounds to me like it's a good thing except if you wanted to use modules from a previous version without recompiling them.