Hi Monks!
I'm right on a deadline and everything was working perfect. Then I made some comments, put use strict in all modules and one 'my' that was missing to compile with strict and when trying to compile, I got this:

Unknown error
Compilation failed in require at BookRetriever.pm line 8.
BEGIN failed--compilation aborted at BookRetriever.pm line 8.
Compilation failed in require at compare_prices.pl line 4.
BEGIN failed--compilation aborted at compare_prices.pl line 4.

These are the first lines of BookRetriever:

package BookRetriever; #################################################### # This class uses Vendor plugins to retrieve book HTML pages from vend +or websites, # parse them, insert it into db and return data from db use DBI; use LWP::UserAgent; use Vendor::Amazon; # LINE 8 use Vendor::BarnesNoble; # Here is configuration for everything our %CONFIG = ('db_host' => 'localhost', 'db_name' => 'books', 'db_user' => 'user', 'db_pass' => 'pass', 'html_retrieve_timeout' => 30, 'vendors' => [ qw(Amazon BarnesNoble) ] );
error line is this use Vendor::Amazon, and error happens Vendor::BarnesNobles if I exchange them. In fact, I made one change right there. It was working, them I erased these two lines, put a BEGIN around our %CONFIG and inside the BEGIN I looped through @{$CONFIG{'vendors'}} and eval "use Vendor::$vendor;";
I kept writing comments all around before testing then noticed the eval didn't work, when I got back the old way it didn't compile
Any ideas?

janitored by ybiC: Balanced <code> tags around codeblock, renamed from "Unknown compile error - desperation"


In reply to Compilation failed, Vendor::Amazon, Vendor::BarnesNoble by luisfagundes

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.