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

hi
is it possible to convert perl code to a standard windows dll wich can be called from another program ?
i know the perl code can be converted to exe or to activex/com dll using activestate pdk, but why converting to a standard dll are abandoned !! even it is more portable than activex dll ; ie it does not require to be registered by regsvr32.exe.
thanks

Replies are listed 'Best First'.
Re: converting perl code to a standard Dll
by thunders (Priest) on Oct 31, 2009 at 20:41 UTC

    Which perl features do you want to use in your code?

    It should be possible to embed a perl interpreter in a DLL written in C or C++, and you can call perl functions from C code (see perlembed and perlcall). For ActiveState you will probably need to use something like Visual Studio or Visual C++ Express to build your DLL.

    There is another perl distribution called Strawberry Perl that includes the gcc compiler, which you can also use to build a DLL.

Re: converting perl code to a standard Dll
by ikegami (Patriarch) on Oct 31, 2009 at 20:39 UTC

    Yes, it's possible to embed Perl in an executable, incl a .dll

    perlembed

Re: converting perl code to a standard Dll
by Anonymous Monk on Oct 31, 2009 at 20:16 UTC
    There is no ready made solution, but it is possible