Hi,

bash-2.02# perl -V:usedl -V:dlsrc -e 'print "$^O\n"'
usedl='define';
dlsrc='dl_dlopen.xs';
solaris

I tried the above as you'll have suggested. This seems to indicate that my
Perl 5.6 install does support dynamic loading.

Now, coming back to my original problem. Any ideas why it's unable to load a
shared object on the fly ?

Regards,
Soumen

-----Original Message-----
From: Peter Prymmer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 19, 2000 11:39 AM
To: Kort, Eric
Cc: 'Soumen Das '; '[EMAIL PROTECTED] '
Subject: RE: Dynamically loading the shared objects




On Mon, 18 Dec 2000, Kort, Eric wrote:

> In the hopes that this is not rediculous, I offer the following question
in
> answer to your questions: is perl compiled with dynamic loading support on
> your system?  We had trouble (for some reason) compiling perl with dynamic
> loading on our Unix system, and therefore we only have static linking
> enabled on that box.
>
> Maybe something to check.  (How do you check?  I'm not sure off the top of
> my head, by I am sure you or someone else here knows.)

The config variable usedl sets dynamic loading for perl:

 % perl -V:usedl
 usedl='define';

The variable dlsrc mentions which xs implementation of Dynaloader was
used.  Perhaps the most common one is based on the dlopen() C RTL call
that was a part of POSIX (I think):

 % perl -V:dlsrc
 dlsrc='dl_dlopen.xs';

Although other values are possible, such as on VMS:

 $ perl "-V:dlsrc"
 dlsrc='dl_vms.c';

A value of dl_none.xs indicates a static only perl, for example:

 $ perl -V:usedl -V:dlsrc -e 'print "$^O\n"'
 usedl='undef';
 dlsrc='dl_none.xs';
 os390

Without resorting to -V command line shorthands you can access those
variables (in a Makefile.PL for example) via the Config module as in:

    use Config;
    my $usedl = $Config{'usedl'};
    my $dlsrc = $Config{'dlsrc'};

Peter Prymmer



Reply via email to