in reply to Version Conflict and XSLoader

In short, this is a perl and module installation error more than something to do with the code.

You need a newer (Update: or fixed) version of something, and that something is probably a module. Updated: Whenever you see VERSION or a version number mentioned in an error, you either have an older version of something installed than what you need, or a module is installed incorrectly.

It could be something called like this:

use <ModuleName> <version.number>;
or
use <ModuleName> <version.number> qw( import these things );
Update:or it could mean a module is completely broken in your installation.

Update: The next section doesn't help with module installations being completely broken, which as ikegami points out is the culprit here.

See use and maybe require. Especially the part where the docs for use() state:
If the VERSION argument is present between Module and LIST, then the "use" will call the VERSION method in class Module with the given version as an argument. The default VERSION method, inherited from the UNIVERSAL class, croaks if the given version is larger than the value of the variable $Module::VERSION.

Your particular issue appears (from a glance) to be with IO::Scalar, but the same issue happens with different modules, so the method is more important in the long run than the specifics. It appears further that from a quick look as IO::Scalar's docs on CPAN that it is part of the IO::Stringy package. Update: My glance was wrong. It's PerlIO::scalar in question, as ikegami pointed out.

Update: as ikegami points out, you can't just copy files around without paying attention to some restraints. Doing so will break things and give you this type of error.

Replies are listed 'Best First'.
Re^2: Receiving Error when running script
by ikegami (Patriarch) on Sep 19, 2007 at 18:08 UTC

    I don't think so. A required version mismatch would look like the following:

    >perl -e "use CGI 9.99 CGI version 9.99 required--this is only version 3.20 at -e line 1. BEGIN failed--compilation aborted at -e line 1.

    Looks more like a descrepency between the version of the .pm and the associated XS object file(.so/.dll).

    Also, the error is for PerlIO::scalar, not IO::Scalar. Since PerlIO::scalar is a core module it means his Perl installation is messed up.

      When I installed a Perl5.8 under C:\Perl5.8, I had modules under the c:\Perl\lib which was a previous version. I copied module folders such as Config\Hash from c:\Perl\lib to c:\Perl5.8\lib. Could that be the issue? Do I need to download newer modules of everything?

        If going from one 5.6 version to another, or from one 5.8 version to another, you can copy modules. However, you half-copied a module, copying it's XS component without copying its .pm component or vice-versa. You should have restricted yourself to non-core modules (site/), for starters.

        If you don't mind some of your modules getting upgraded, you would probably have been better off copying c:\perl to c:\perl5.8 then install over c:\perl5.8.

        Yes.
        and, yes.

        You can't simply copy modules (other than those which are pure perl) from one place to another and expect them to work.

      Thanks for pointing those out. When I said, "from a glance", I guess I meant it more literally than I thought.

      Update:

      the original node I posted is now updated to show the shortcomings ikegami pointed out in it. Hopefully that will keep it from confusing anyone.
        I uninstalled all older versions of Perl that I had on my PC and installed a fresh copy of Perl 5.8 and used ppm to install all of the modules that I needed. Things seem to be working better. Now when I type in perl myscript.pl, I receive the following error message:

        Win32::GUI: the -style o ption is deprecated! at C:\LegacyPF\Perl\site +\lib\Win32\GUI.pm line 603.
Re^2: Version Conflict and XSLoader
by almaler (Novice) on Sep 19, 2007 at 17:58 UTC
    In the script, I have found the following "use" statements, but I did not find any "require" statements.
    use Config::IniHash; use Win32:GUI; use Net::Telnet; use Hash::Case; use Net::Telnet ();
    So, I need to download these modules?