in reply to Specifying .pm files

To add to the comments above, one thing that seems to be tripping you up (that I didn't see emphasized in the links mentioned) is the implicit correspondence between module names and directory structure. As davorg told you, the module name is "Config::Simple", not "Simple", but that also means that perl expects to find it as a file "Simple.pm" in a directory named "Config", so it's looking for "Config\Simple.pm" in its library paths.

"C:\Testing\ITP\Config\Simple.pm" is the path I think you wanted. When you instead put it at "C:\Testing\ITP\Simple.pm", the file still has "package Config::Simple;" in it to define the module's name, which doesn't match the path.

Replies are listed 'Best First'.
Re^2: Specifying .pm files
by mantra2006 (Hermit) on Aug 17, 2006 at 12:44 UTC
    Hello Monks

    even after specifying the directory structure I am still getting
    compilation erros. where am missing
    Can't locate auto/Config/Simple/autosplit.ix in @INC (@INC contains: C +://Testing//ITP//Config C:/Testing/ITP c:/Perl/lib c:/Perl/site/l ib .) at c:/Perl/lib/AutoLoader.pm line 158. at C:/Testing/ITP/Config/Simple.pm line 13 Can't locate auto/Config/Simple/autosplit.ix in @INC (@INC contains: C +://Testing//ITP//Config C:/Testing/ITP c:/Perl/lib c:/Perl/site/l ib .) at c:/Perl/lib/AutoLoader.pm line 158. at C://Testing//ITP//Config/Simple.pm line 13 Simple.pm => C://Testing//ITP//Config/Simple.pm Can't locate object method "new" via package "Simple" (perhaps you for +got to load "Simple"?) at readProps.pl line 14.

      You still haven't installed it properly.

      To clarify, it looks like the module includes compiled XS code. For modules like this, you can't just copy files from CPAN into the right place. You need to install the module properly. You should still be able to use 'ppm'.

      --
      <http://dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

        Installing to a consistent local folder is doable but requires a bit of research, mostly because of differences between Module::Build and ExtUtils::MakeMaker.

        At work I need to install a large number of modules locally as a non-root user and I quickly got tired of the manual build process. Behind the 'readmore' tags is the current version of a bash script I wrote to automate this process. After I clean it up and check for existing implementations I'll post it if people find it useful.

        Update - After having my first coffee of the day I re-read the OP and noticed the 'C:\'. Bash scripts typically aren't useful on windows, so ignore this post.