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.


Enjoy, Have FUN! H.Merijn

In reply to Re: Roger the Phone Guy by Tux
in thread Roger the Phone Guy by ptx

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.