Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2005
    Location
    India
    Posts
    750

    Perl script - a simple question

    Hello,

    I inherited a Perl script and I can't get it to run.

    The script has a statement "use sqllibrary;" on the 3rd line, I have been unable to find anything about "sqllibrary" on Google. So I think this might be custom module.

    Can someone please confirm whether there is an inbuilt Perl module named "sqllibrary" or whether it is a custom module.

    Needless to say, I know nothing about Perl. My guess is that the sqllibrary is a custom module and the developer who sent me the script has not packaged the this module along with.
    Darsh Web Solutions : Web Design, PHP Development, E-Commerce Solutions

    PHP Tutorials : Tutorials and scripts for beginners

  2. #2
    Join Date
    Mar 2009
    Location
    /home/khunj
    Posts
    432
    That looks like a custom module.
    Perl has a "SQL::Library" module, but no "sqllibrary" IMHO.
    NinTechNet
    ★ NinjaFirewall : Web Application Firewall for PHP and WordPress.
    ★ NinjaMonitoring : Monitor your website for suspicious activities.

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    750
    Perl has a "SQL::Library" module, but no "sqllibrary" IMHO.
    Yes, that is what I kept coming across when I googled for it. Any idea where custom Perl modules are located on the server?
    Darsh Web Solutions : Web Design, PHP Development, E-Commerce Solutions

    PHP Tutorials : Tutorials and scripts for beginners

  4. #4
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Quote Originally Posted by Jatinder View Post
    The script has a statement "use sqllibrary;" on the 3rd line
    The second line wouldn't be something like this, by any chance?
    Code:
    use lib "/path/to/customlibs";
    If not, it's probably expecting a file called sqllibrary.pm in the same directory as the main script.

    Edit: When it fails to run the error message will tell you which library directories are being checked.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  5. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    750
    The second line wouldn't be something like this, by any chance? use lib "/path/to/customlibs";
    Nope, nothing like that. No paths, and there is no sqllibrary.pm file in the current directory either.

    Edit: When it fails to run the error message will tell you which library directories are being checked.
    I was getting a 500 error, but then I enabled Perl errors using
    "use CGI::Carp qw(fatalsToBrowser);" and now I get the following error in my browser:

    Can't locate sqllibrary.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .)



    So I guess I am missing the sqllibrary.pm file.
    Darsh Web Solutions : Web Design, PHP Development, E-Commerce Solutions

    PHP Tutorials : Tutorials and scripts for beginners

  6. #6
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Yep. At least if you got this script from a developer he / she should be able to understand what you're talking about and find the missing file.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  7. #7
    Join Date
    Jul 2009
    Location
    UK
    Posts
    1,308
    You could try the command:
    cpan install SQL::Library

    Oops sorry, just seen.
    " So I guess I am missing the sqllibrary.pm file."

    yes,
    If you can find that, dump it into one of those directories and it should work.
    Hopefully its not a "custom" module written internally.

    http://rpm.pbone.net/index.php3/stat...oarch.rpm.html

    Looks like it may be part of SQL::Library

    So try the command
    cpan install SQL::Library
    as mentioned above. ( run as root )
    Live Chat Support Software for your Business website - IMsupporting.com

Similar Threads

  1. simple perl script for hdd check
    By icehosting in forum Software & Scripts Requests
    Replies: 0
    Last Post: 01-30-2010, 03:56 PM
  2. Simple Perl Script Needed.....
    By KaOtiC MiNd in forum Employment / Job Offers
    Replies: 4
    Last Post: 12-04-2002, 07:22 PM
  3. [PERL] - Simple perl question...
    By hypernatic.net in forum Web Hosting Lounge
    Replies: 4
    Last Post: 04-05-2002, 05:56 PM
  4. Simple Perl Script Needed Please
    By texasweb in forum Hosting Security and Technology
    Replies: 3
    Last Post: 02-02-2002, 04:36 PM

Posting Permissions

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