0

I am a noob to perl. Searching for "How to install a perl module" I did install cpan and tried the following:

sudo cpan install Logger

But received:

Going to read '/Users/steve/.cpan/Metadata'
  Database was generated on Wed, 09 Oct 2013 06:53:03 GMT
Warning: Cannot install Logger, don't know what it is.
Try the command

    i /Logger/

to find objects with matching identifiers.

So I tried that too:

cpan[1]> i Logger
Going to read '/Users/steve/.cpan/Metadata'
  Database was generated on Wed, 09 Oct 2013 06:53:03 GMT
No objects found of any type for argument Logger

Here are some of the imports:

use TDScli;
use Logger;
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
  • You need to supply the module name. If you want `Logger::Simple`, say `sudo cpan install Logger::Simple`. – devnull Oct 09 '13 at 07:26
  • Do you mean Logger::Logger? Go and look on search.cpan.org – Vorsprung Oct 09 '13 at 07:26
  • 1
    I don't know which one. The usages in the code are all Logger::some_method. e.g. Logger::log_info – WestCoastProjects Oct 09 '13 at 07:31
  • It should be obvious which module needs to be loaded. Look for the "use Logger" line that loads the module. In this situation I would use ``grep -r '^use Logger' * `` on the source tree – Vorsprung Oct 09 '13 at 07:36
  • Oh I looked for that already.. obvious?? use TDScli; use Logger; Does not say.. BTW TDScli i have the same issue - not sure what to run for cpan. – WestCoastProjects Oct 09 '13 at 07:40
  • 2
    TDScli and Logger are local modules, either part of the program you are trying to use or a dependency on it. You need to consult the documentation for the program and see what dependencies it has or find the module. ``locate Logger.pm`` might possibly find it if it is installed somewhere odd. If there is a ``Logger.pm`` on the system then it might be an @INC path problem in the script – Vorsprung Oct 09 '13 at 08:11
  • This is the correct answer. Those modules do not exist anyplace obvious in my codebase, so yes it will require consultation with the original developer to determine how to build this code. – WestCoastProjects Oct 09 '13 at 14:36

2 Answers2

5

There is no module on CPAN that is called Logger. They are all called "Logger::Something" or "Something::Logger". If your project is using a module that is just called "Logger", then it didn't come from CPAN. You need to find out where you are supposed to get that module from.

Dave Cross
  • 68,119
  • 3
  • 51
  • 97
  • This is the correct answer. Those modules do not exist anyplace obvious in my codebase, so yes it will require consultation with the original developer to determine how to build this code. Please consider to upvote. – WestCoastProjects Oct 09 '13 at 14:37
0

you have to down load the OBD II Perl logger and move it to a your home dir, then extract it, use software such as Geany it is opensource to compile the file wit .pl and you will have a terminal opened in front of you reading your OBD II scanner not all of them are working with this software. it is simple and all scan in the terminal logged in a text file.