Can't locate object method

chris (2008-01-17 18:30:13)
3810 views
3 replies

If you start seeing this error when using the cpan> prompt, don't panic. It simply means that the module index is incomplete, or corrupted, or unavailable for some reason. That's just an index which CPAN uses to indicate what modules are available.

This problem caught me out earlier today.. Hopefully this will save you some time - In order to solve the problem, just run this at your cpan prompt:
cpan> reload index

Then try again with your install command and it should work just fine..

christo

Follow me on twitter to catch all my tech postings: http://www.twitter.com/planet_guru
Digg it! Submit to Slashdot Add to Blinklist Del.icio.us Add to Newsvine Add to Technorati Add it to Google Bookmarks
comment
harikrishna
2008-10-23 11:20:20

Thanks for you suggestion

If you start seeing this error when using the cpan> prompt, don't panic. It simply means that the module index is incomplete, or corrupted, or unavailable for some reason. That's just an index which CPAN uses to indicate what modules are available.

This problem caught me out earlier today.. Hopefully this will save you some time - In order to solve the problem, just run this at your cpan prompt:
cpan> reload index

Then try again with your install command and it should work just fine..

christo



Hi,
Thanks for your suggestion its working for me
reply icon
Dan Falconer
2008-12-29 17:02:19

Solution

I tried to do the "reload index" fix, but that didn't seem to work for me. Deleting the CPAN/Config.pm and the .cpan directory (in my case, /root/.cpan/) finally did the trick. I know this is an old post, but I didn't find an answer anywhere else (and this website was the first hit from Google).
reply icon
jimmy
2011-01-31 12:04:18

I tried to do the "reload index" fix, but that didn't seem to work for me. Deleting the CPAN/Config.pm and the .cpan directory (in my case, /root/.cpan/) finally did the trick. I know this is an old post, but I didn't find an answer anywhere else (and this website was the first hit from Google).


Yes, you have to delete the Config.pm file first. Or, perl will read that file again, infinite loop.
reply icon