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

Hi, In the process of using the Net::Amazon::EC2 module, I had to install Class::MOP. However, I get the following message:
Can't load 'C:/Perl/site/lib/auto/Class/MOP/MOP.dll' for module Class: +:MOP: load_file:The specified procedure could not be found at C:/Perl +/lib/XSLoader.pm line 64. at C:/Perl/site/lib/Class/MOP.pm line 53
Now, I've verified that I have MOP.dll, and am now stuck as to the next move... can anybody help?

I'm doing this with perl5.8.8 build 822 on Windows XP, and downloaded all my modules with ActiveState Perl Package Manager...

Thanks, Matt

Replies are listed 'Best First'.
Re: Class::MOP and MOP.dll
by BrowserUk (Patriarch) on Oct 10, 2008 at 22:01 UTC

    What output do you get if you type the command:

    dumpbin /exports C:/Perl/site/lib/auto/Class/MOP/MOP.dll

    You shoudl see something like:

    Dump of file \perl\site\lib\auto\Class\MOP\MOP.dll File Type: DLL Section contains the following exports for MOP.dll 00000000 characteristics 481C00C5 time date stamp Sat May 03 07:05:57 2008 0.00 version 1 ordinal base 2 number of functions 2 number of names ordinal hint RVA name 1 0 000012E4 _boot_Class__MOP 2 1 000012E4 boot_Class__MOP Summary 1000 .data 1000 .rdata 1000 .reloc 1000 .text

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      I previously tried to install XML::LibXML from Trouchelle and I got the same error.

      >perl -e"use XML::LibXML;" Can't load 'c:/Progs/perl588/site/lib/auto/XML/LibXML/LibXML.dll' for +module XML::LibXML: load_file:The specified procedure could not be fo +und at c:/Progs/perl588/lib/DynaLoader.pm line 230. at c:/Progs/perl588/site/lib/XML/LibXML.pm line 116 BEGIN failed--compilation aborted at c:/Progs/perl588/site/lib/XML/Lib +XML.pm line 116. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.

      What the OP didn't specify is that Windows displays a dialog saying

      The procedure entry point Perl_newXS_flags could not be located in the + dynamic link library perl58.dll

      for Class::MOP and

      The procedure entry point Perl_sv_2iv_flags could not be located in th +e dynamic link library perl58.dll

      for XML::LibXML.

      >dumpbin /imports c:/Progs/perl588/site/lib/auto/Class/MOP/MOP.dll | f +ind "newXS" 3EF Perl_newXS_flags >dumpbin /exports c:/Progs/perl588/bin/perl58.dll | find "newXS" 965 3C4 0001C8CF Perl_newXS

      I just found a web site that suggests upgrading to build 822 or higher.

      >perl -v This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 25 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Binary build 817 [257965] provided by ActiveState http://www.ActiveSta +te.com Built Mar 20 2006 17:54:25 ...

      Testing. Will post results.

        Success!
        >perl -v This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 12 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 824 [287188] provided by ActiveState http://www.ActiveSta +te.com Built Sep 3 2008 11:14:55 ... >perl -e"use Class::MOP" >perl -e"use XML::LibXML" >
        I believe this sort of problem would be avoided if the trouchelle rep's ppm packages were all built using perl-5.8.0.

        I have Serguei's email address - I'll drop him a note.

        Cheers,
        Rob
        What the OP didn't specify is that Windows displays a dialog saying The procedure entry point Perl_newXS_flags could not be located in the dynamic link library perl58.dll

        Yes. That was the information I was after. I offered to send him a copy of dumpbin.exe, but he never took me up on it.

        Still, no need now, you've got this well sussed.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
      I don't seem to have 'dumpbin' on my system... where do i get it?
Re: Class::MOP and MOP.dll
by syphilis (Archbishop) on Oct 11, 2008 at 01:32 UTC
    Hi,
    By my reckoning, line 53 of MOP.pm is:
    __PACKAGE__->XSLoader::load($XS_VERSION);
    And it's very strange that such a piece of code should produce that error. Maybe 'ppm remove' the module, and then 'ppm install' it again - see if that fixes the problem. If it doesn't, contact the trouchelle rep maintainer.

    The latest Class::MOP can be built without a compiler, so you could get yourself the freely available 'dmake' utility from CPAN, download the latest Class::MOP source from CPAN, and build the module yourself, if need be. That would give you a pure-perl (slower) build ... I don't know if the speed loss would be significant to you.

    Cheers,
    Rob
Re: Class::MOP and MOP.dll
by Anonymous Monk on Oct 10, 2008 at 23:00 UTC
    and downloaded all my modules with ActiveState Perl Package Manager...
    From which repository?
      v 0.66 from trouchelle.com