You've got answers enough already that should guide you to success. I'd like to expand on this error message.
If you have installed perl and cpan, it is most often way more comfortable to type $ cpan Data::Dumper directly. No need for the install keyword. If you still prefer the module approach, quote the module name like perl -MCPAN -we'install "Data::Dumper"'
What you did shows something funny, which I cannot explain
$ perl -MCPAN -we'install Data::Dumper' Can't locate object method "install" via package "Data::Dumper" at -e +line 1. $ perl -MCPAN -we'install "Data::Dumper"' : Data::Dumper is up to date (2.161). $ perl -MCPAN -wE'install Sys::Hostname' Can't locate object method "install" via package "Sys::Hostname" at -e + line 1. $ perl -MCPAN -wE'install "Sys::Hostname"' : The most recent version "1.22" of the module "Sys::Hostname" is part of the perl-5.28.0 distribution. To install that, you need to +run force install Sys::Hostname --or-- install X/XS/XSAWYERX/perl-5.28.0.tar.gz $ perl -MCPAN -wE'install Kitchen::Sink' : Warning: Cannot install Kitchen::Sink, don't know what it is. Try the command i /Kitchen::Sink/ to find objects with matching identifiers. $ perl -MCPAN -wE'install "Kitchen::Sink"' : Warning: Cannot install Kitchen::Sink, don't know what it is. Try the command i /Kitchen::Sink/ to find objects with matching identifiers.
perl -d:TraceUse ... does not show hints of Data::Dumper being loaded (Sys::Hostname is loaded), so I have no idea why some module pattern generate an error where others do not.
In reply to Re: Roger the Phone Guy
by Tux
in thread Roger the Phone Guy
by ptx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |