in reply to Re: Module Path Problem
in thread Module Path Problem

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;

Replies are listed 'Best First'.
Re^3: Module Path Problem
by MidLifeXis (Monsignor) on Nov 18, 2014 at 18:05 UTC

    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

        Then the line should be use lib '.'; or use lib '/FULL/PATH/TO/FOLDER1';

        On a security-related note: make sure that your library path is not directly accessible from web-space.

        --MidLifeXis

Re^3: Module Path Problem
by poj (Abbot) on Nov 18, 2014 at 18:37 UTC
    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