As Demonstrated in the code above, I do not list a path to perl in my code, making it a little more portable among all the little cheap devices I play with.
The result of the querying was:
mike@BlsckBox:~/Desktop$ which cpanm
/usr/bin/cpanm
mike@BlsckBox:~/Desktop$ which perl
/usr/bin/perl
mike@BlsckBox:~/Desktop$ perl -le 'print $^X'
/usr/bin/perl
mike@BlsckBox:~/Desktop$
Thanks for putting up with this old 70s freak.
| [reply] [d/l] |
Hm, so it looks like you're using the system Perl. I assume your scripts also start with the line "#!/usr/bin/perl"? Then question then is why cpanm Device::SerialPort shows the module is installed. Perhaps you're using a not fully configured local::lib? Did you try looking for the SerialPort.pm file like tybalt89 suggested? Also, if you could show the output of the following commands.
$ echo $PERL5LIB
$ echo $PERL_MB_OPT
$ echo $PERL_MM_OPT
$ echo $INSTALL_BASE
Update: I struck the question that I missed your answer to before. Also, I should say that modifying the system Perl with cpan or cpanm is not necessarily recommended, since it's possible for failed module installations to mess up the system Perl and potentially all the system tools that rely on it. It usually is ok to install modules into the system Perl with the system's package manager though, so on Ubuntu you could use sudo apt-get install libdevice-serialport-perl. Either that, or you could use local::lib to install modules in your home directory, or you could even use perlbrew to install your own local copy of Perl that you can install all the modules you like, plus you'd get the newest version of Perl available. | [reply] [d/l] [select] |
| [reply] |