in reply to Re: Dynaloader not loading LibXML
in thread Dynaloader not loading LibXML

OK, here's an odd thing: it does run from the C drive, but I get the error message when I try to run it from a network drive. Same for any scripts using LibXML. Any ideas why this should be?

Replies are listed 'Best First'.
Re^3: Dynaloader not loading LibXML
by syphilis (Archbishop) on Apr 26, 2016 at 13:41 UTC
    it does run from the C drive, but I get the error message when I try to run it from a network drive

    I've no experience with running from a network drive - which is probably the reason that I've never seen that "specified path is invalid .." error message before.
    Could it be that 'C:/Strawberry/perl/vendor/lib/auto/XML/LibXML/LibXML.xs.dll' is an invalid path specification (as the error message states) when running from a network drive ?
    Hopefully someone with better knowledge of running from a network drive can provide something a bit more definite.

    (An incorrect UPDATE removed.)

    One other (probably unrelated) thing to note is that your error message relates to the XML::LibXML that's installed in perl/vendor/lib.
    That's the XML::LibXML that shipped with Strawberry Perl - it's not the XML::LibXML that you installed. (The one you installed should be in perl/site/lib.)
    Normally, perl/site/lib comes before perl/vendor/lib in @INC, which means that in a normal situation the XML::LibXML in perl/site/lib is the one that would get loaded.
    But your perl5lib changed the @INC order, putting perl/vendor/lib ahead of perl/site/lib and thus ensuring that the XML::LibXML in perl/vendor/lib is the one that gets loaded.

    Cheers,
    Rob

      I can dir the folder in question from a network drive and see the contents, so I don't think that's the problem. I've also run Perl from this network before, this is just a new computer I'm running from.

      Thanks for the info re perl5lib, but I only added that in an attempty to fix this problem, so I don't think it's the root.

        Thanks for the info re perl5lib, but I only added that in an attempt to fix this problem, so I don't think it's the root.

        Yes, on further reflection I agree - it's altering which XML::LibXML gets loaded, but that should be all.

        Looking at the msdn documentation for that error it says:
        be sure to separate directories from subdirectories with a backslash
        Forward slashes are usually fine with perl but I wonder if they're messing things up over the network drive.
        Admittedly, one would think if that's the case then it would surely have come up before now.

        And we don't even know which path it is that's invalid.
        All we know is that 'C:/Strawberry/perl/vendor/lib/auto/XML/LibXML/LibXML.xs.dll' can't be loaded.

        You have checked that both the "vendor" and "site" installations of XML::LibXML are similarly affected ?

        I'm out of straws ...

        Cheers,
        Rob