Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2010
    Posts
    79
    Thanks
    1
    Thanked 0 Times in 0 Posts

    problem with @INC and use pragma

    1: #!/usr/bin/perl -w
    2:
    3: use CGI;
    4: use CGI::Carp qw(fatalsToBrowser);
    5: use CGI::Session;
    6: use lib qw(/home/savio/myperlprograms);
    7: use DataAccess; <------
    8: use DBI;
    9: use Template;
    DataAccess.pm is placed into /home/savio/myperlprograms, but I have following errors:

    Can't locate DataAccess.pm in @INC (@INC contains: /home/savio/myperlprograms /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/lib/cgi-bin/login.cgi line 7.
    BEGIN failed--compilation aborted at /usr/lib/cgi-bin/login.cgi line 7.

    Where is the problem?
    Last edited by dark0s; 10-03-2010 at 04:02 PM.

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,944
    Thanks
    2
    Thanked 170 Times in 165 Posts
    Double check the spelling. Is it possible that you saved the file as DataAccess.pl instead of DataAccess.pm?

    Check the file and directory permissions.

  • #3
    New Coder
    Join Date
    Jan 2010
    Posts
    79
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ok thank you, it was a file permissions problem.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •