Menu ▾ ▴

Trouble with @INC

Help
LukeS
2007-01-03
2013-05-20
  • LukeS

    LukeS - 2007-01-03

    Hello;

    This is a very simple question.

    I have the following line in a script:

    use Mail::Box::Manager;

    I get the error in the Eclipse console:

    Can't locate Mail/Address.pm in @INC (@INC contains: C:/Perl/lib/Mail/Message/Field C:/Perl/site/lib C:/Perl/lib .) in C:/Perl/lib/Mail/Message/Field.pm line 10

    It looks like it is finding the Field.pm ok but not looking in the wrong location for Address.pm? This is strange to me because I added the location of this file to the @INC (C:/Perl/lib/Mail/Message/Field).

    From the PDF I am not sure how to modify the Perl Include Path.

    Can anyone over there advise?

    Thanks,

    Luke

     
    • Jan Ploski

      Jan Ploski - 2007-01-03

      To modify the include path, right-click on the Perl project and edit its Properties. After that, choose Project/Clean... from the main menu to revalidate all scripts in your project.

      If the module which can't be found is called Mail::Address, its definition should be contained in a file <somewhere>/Mail/Address.pm, and you should add <somewhere> to the include path.

       
    • LukeS

      LukeS - 2007-01-03

      I think I have set something up wrong.

      I downloaded Mail-Box-2.069 and place the Mail folder from Mail-Box-2.069\lib into the C:\Perl\lib.

      What confuses me is /Mail/Address.pm does not exist. The path to Address.pm is C:/Perl/lib/Mail/Message/Field (which I have added to the @INC as you described above).

      I am not sure why it is looking for /Mail/Address.pm?

      Luke

       
      • Jan Ploski

        Jan Ploski - 2007-01-03

        Mail::Address is in bundle MailTools which you should install as well.

        Unless you have a good reason, you should use ActiveState's tool 'ppm' to install bundles (including their dependencies) instead of downloading them directly from CPAN.

         
    • LukeS

      LukeS - 2007-01-03

      Ah, using the tool did the trick. Thanks :-)

       

Log in to post a comment.