Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

This is perl 5, version 18, subversion 1, running on OpenSuse 13.1

I have written multiple packages without a problem. Alas, I have a problem I have never encountered before. Here is the error message:

ted@linux-jp04:~/Work/Projects/Acuity> ./test.acuity.pkg.pl Can't locate acuity.pm in @INC (you may need to install the acuity mod +ule) (@INC contains: home/ted/Work/Projects/Acuity/REJBlib /usr/lib/p +erl5/site_perl/5.18.1/x86_64-linux-thread-multi /usr/lib/perl5/site_p +erl/5.18.1 /usr/lib/perl5/vendor_perl/5.18.1/x86_64-linux-thread-mult +i /usr/lib/perl5/vendor_perl/5.18.1 /usr/lib/perl5/5.18.1/x86_64-linu +x-thread-multi /usr/lib/perl5/5.18.1 /usr/lib/perl5/site_perl .) at . +/test.acuity.pkg.pl line 13. BEGIN failed--compilation aborted at ./test.acuity.pkg.pl line 13.

Obviously, the file so named is actually there:

ted@linux-jp04:~/Work/Projects/Acuity> ls ./REJBlib total 32 drwxr-xr-x 2 ted users 4096 Jan 15 17:17 ./ drwxr-xr-x 3 ted users 4096 Jan 15 17:17 ../ -rwxr-xr-x 1 ted users 8983 Jan 15 17:17 acuity.pm* -rwxr-xr-x 1 ted users 8983 Jan 15 16:58 acuity.pm~* ted@linux-jp04:~/Work/Projects/Acuity>

While I am not sure my code is the problem, here are the first few lines of code in my script:

#!/usr/bin/perl -d:NYTProf use warnings; use strict; use DateTime; use IO::All; use DateTime; use Math::Random::MT::Auto qw(rand irand); use lib 'home/ted/Work/Projects/Acuity/REJBlib'; use acuity; $| = 1;

And here are the first few lines of my package:

package acuity; use strict; use Exporter; use Carp; use Digest::MD5 qw(md5 md5_hex md5_base64); use DateTime; use Log::Log4perl qw(:easy get_logger); use LWP::UserAgent; use LWP::Protocol::https; use HTTP::Request; use HTTP::Request::Common; use HTTP::Response; use HTTP::Status; use Encode qw(decode encode); use JSON; use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 1.00; @ISA = qw (Exporter); @EXPORT = (); @EXPORT_OK = qw(check_risk update_risk_data); %EXPORT_TAGS = (All => [qw(&check_risk &update_risk_data)]); my $class_data = {

And the last line in the package file is '1;'

So, it is clear from the error message that the 'use lib' statement had the desired effect, and that the package file exists in the directory specified. So, why is Perl not finding my package?

Any insights would be appreciated.

Thanks

Ted


In reply to Problems getting Perl to find my package by ted.byers

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (6)
    As of 2014-10-21 04:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (96 votes), past polls