ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pdk
pdk
RE: shared objects for modules with two-component names in PDK 7.1
by Jan Dubois other posts by this author
Feb 6 2008 11:26AM messages near this date
shared objects for modules with two-component names in PDK 7.1 | ActiveState releases Perl Dev Kit 7.1 with ActivePerl 5.10 support
On Tue, 05 Feb 2008, Ingo Schwarze wrote:
>  about half a year ago, i sent the message included below to this
>  list, but according to the archive at aspn.activestate.com, there
>  was never any reply.

Hi Ingo,

Sorry about not replying to your message before; I must have missed it.

I've looked at your original message, and see why it is not working:

For the shared library, you need to add the modules as modules, and not
as the main script.  For example, you could use

    perlapp --shared --private --add MyPack::MyMod --script /dev/null
            --exe lib/MyLib.so

Instead of using /dev/null as the main script name you can of course
write a little text file MyLib.pl containing just require statements:

    require MyPack::MyMod

and then build the lib as

    perlapp --shared --private MyLib.pl --exe lib/MyLib.so

This avoids having to --add the modules on the commandline.

Note that you can put many Perl modules into a single shared library,
not just one.  This is generally advisable as there is still some
fixed sized overhead for each library.

>  I'm still wondering
>   * whether PDK 6.0 is indeed unable to compile Perl modules
>     with multiple-component names into PDK shared objects

It should be possible with the changes I explained above.

>   * in case this was a known limitation, whether it is fixed in 7.1
>   * in case this is fixed in 7.1, whether it will work together
>     with using the shared version of libperl.

Yes, it will work with a shared libperl.  By default the libperl.so
will be bundled in the shared library MyLib.so, but it will be
faster to use --xclude to exclude it and bundled it separately
in your runlib directory (you need to specify --xclude when
building both the library *and* the app).

Regarding unloading of modules, that is really outside the scope
of PerlApp.  You should be able to do it the same way you would
do it in plain Perl (deleting namespaces etc).

Cheers,
-Jan


_______________________________________________
PDK mailing list
PDK@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Ingo Schwarze
Jan Dubois

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved