Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

how to identify if module is using the c interface

by david2008 (Scribe)
on Jan 31, 2012 at 15:10 UTC ( #950998=perlquestion: print w/ replies, xml ) Need Help??
david2008 has asked for the wisdom of the Perl Monks concerning the following question:

I am using the module XML::Easy::Text.
It writes that it has a c implementation with a pure perl backup.
How do i know on my machine if the module is using the c implementation or the pure perl backup?

Comment on how to identify if module is using the c interface
Re: how to identify if module is using the c interface
by Anonymous Monk on Jan 31, 2012 at 15:20 UTC

    Why would you care?

    You could check

    $ perl -MDDS -le " Dump\@DynaLoader::dl_modules " $ARRAY1 = [ 'B', 're', 'List::Util', 'B::Utils', 'Data::Dumper', 'IO', 'Fcntl', 'PadWalker', 'Data::Dump::Streamer', 'Hash::Util' ];
      $ perl -MDDS -le " print for grep /dll/i, %::" _<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/B/B.dll *main::_<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/B/B.dll _<C:/perl/site/5.14.1/lib/MSWin32-x86-multi-thread/auto/Data/Dump/Stre +amer/Streamer.dll *main::_<C:/perl/site/5.14.1/lib/MSWin32-x86-multi-thread/auto/Data/Du +mp/Streamer/Streamer.dll _<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/Hash/Util/Util.dll *main::_<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/Hash/Util/Ut +il.dll _<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/Fcntl/Fcntl.dll *main::_<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/Fcntl/Fcntl. +dll _<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/Data/Dumper/Dumper. +dll *main::_<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/Data/Dumper/ +Dumper.dll _<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/IO/IO.dll *main::_<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/IO/IO.dll _<C:/perl/site/5.14.1/lib/MSWin32-x86-multi-thread/auto/PadWalker/PadW +alker.dll *main::_<C:/perl/site/5.14.1/lib/MSWin32-x86-multi-thread/auto/PadWalk +er/PadWalker.dll _<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/re/re.dll *main::_<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/re/re.dll _<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/List/Util/Util.dll *main::_<C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/auto/List/Util/Ut +il.dll _<C:/perl/site/5.14.1/lib/MSWin32-x86-multi-thread/auto/B/Utils/Utils. +dll *main::_<C:/perl/site/5.14.1/lib/MSWin32-x86-multi-thread/auto/B/Utils +/Utils.dll
        Where can i find the DDS module?
        I don't find it in cpan
Re: how to identify if module is using the c interface
by ikegami (Pope) on Jan 31, 2012 at 21:36 UTC

    Module of this kind sometimes provide a function that indicates which version was loaded. That does not appear to the be the case here.

    Module of this kind usually split the PP and XS components into different modules. For these, you could test %INC for the XS version of the module. That's not the case here.

    So that leaves checking if the binary component of the module was loaded.

    use DynaLoader qw( ); use XML::Easy qw( ); warn "You may experience poor performance due to " . "the use of a Pure Perl build of XML-Easy.\n" if !grep $_ eq 'XML::Easy', @DynaLoader::dl_modules;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://950998]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (16)
As of 2014-09-18 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (120 votes), past polls