Ron Savage wrote:
Because of this curiosity:
[EMAIL PROTECTED]:~/perl.modules$ perl -MCPAN -e 'install YAML'
Can't locate object method "install" via package "YAML" at -e line 1.
[EMAIL PROTECTED]:~/perl.modules$ perl -MCPAN -e 'install YAML::Syck'
Can't locate object method "install" via package "YAML::Syck" at -e line
1.
[EMAIL PROTECTED]:~/perl.modules$ perl -MCPAN -e 'install CPAN::Mini'
CPAN: File::HomeDir loaded ok (v0.66)
...etc...
it's not clear to me how to optionally install YAML and YAML::Syck after
asking the user if they want to. Or are these modules designed
deliberately to disallow that?
You're running into the ambiguity surrounding indirect object syntax, has
nothing to do with CPAN.pm.
$ perl -wle 'foo Bar'
Can't locate object method "foo" via package "Bar" (perhaps you forgot to load
"Bar"?) at -e line 1.
Perl thinks you're saying Bar->foo(). Use a + to disambiguate:
$ perl -MCPAN -e 'install +YAML'
CPAN: File::HomeDir loaded ok (v0.69)
...
Or use the cpan script:
$ cpan YAML
CPAN: File::HomeDir loaded ok (v0.69)
...
--
I am somewhat preoccupied telling the laws of physics to shut up and sit down.
-- Vaarsuvius, "Order of the Stick"
http://www.giantitp.com/comics/oots0107.html