in reply to Module Path Problem

Is it '/webdir/Auth', or '../../webdir/Auth'? '../..' is replaced with the base directory of your library directory relative to your .pl script.

Note: "it does not work" is usually not a very good or informative error message. Including the message from your error log and/or browser will likely be helpful.

--MidLifeXis

Replies are listed 'Best First'.
Re^2: Module Path Problem
by bigup401 (Pilgrim) on Nov 18, 2014 at 17:41 UTC

    lets say domain.com/folder1/Authen/OATH.pm #this is the module location so am calling the module like this

    use lib '/folder1'; use Authen::OATH;

      and where is your CGI script / .pl page, using the same domain.com/folder1/.... example? As it stands, you are asking for the script to search in the root directory available to the .pl script. I am guessing that this is not the case, unless some chroot magic is happening.

      --MidLifeXis

        cgi, pl files are in folder1
      Place this script in the same folder as your .pl script and browse it.
      #!/usr/bin/perl # cwd.pl use strict; use CGI; use CGI::Carp 'fatalsToBrowser'; use Cwd; my $q = new CGI; print $q->header, $q->start_html(), $q->pre(cwd()), $q->end_html;

      What path is displayed?

      poj