Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I'm pretty sure that the "module" here is not a Perl module, due to the reference to dlopen(), which is the C interface to shared libraries.

So what you need is the Perl module C::DynaLib. You can also try the FFI module which supports call-backs. They both allow you to attach to a shared library (or *.DLL under Windows) and call routines in it.

You can also try the Inline module which lets you, at run time, write C code to interface to the shared library, compile that C code into a shared library module that Perl can load, and then use that shared library to access the library you are interested in -- all without leaving the currently running script. Subsequent requests to use that C code only go through the compilation step if you have changed the C code. A pretty neat module but probably not as good for what you seem to want as the first two I mentioned.

All of these are available from CPAN. Go to and search for any of these modules to browse the read-me files or documentation. Then download the latest version, probably as a *.tar.gz file. I hope you already have gunzip or GNU tar [and I assume that you already have tar since you mentioned dlopen()]. That way you can unpack the archive and do the standard:

perl Makefile.PL make test make install
to build, test, and install the Perl module.

Once the module is installed, you can type "perldoc C::DynaLib" (for example) to read the documentation that came with the module.

        - tye (but my friends call me "Tye")

In reply to (tye)Re: Load and unload modules ala dlopen(); by tye
in thread Load and unload modules ala dlopen(); by hydo

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2023-12-11 22:24 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.