Bugzilla – Bug 12671
YAML::Syck Installed but check is failing due to ambiguity surrounding indirect object syntax
Last modified: 2011-03-16 04:34:11 UTC
Hello - YAML::Syck and other YAML modules installed but check is failing. I think the key to the problem is; http://markmail.org/message/cy34bwib4eweitiv#query:%22Can%27t%20locate%20object%20method%20install%20via%20package%20YAML%3A%3ASyck%20at%20-e%20line%201.%22+page:1+mid:cy34bwib4eweitiv+state:results Quoting from the page; "" Ron Savage wrote: Because of this curiosity: ron@zoe:~/perl.modules$ perl -MCPAN -e 'install YAML' Can't locate object method "install" via package "YAML" at -e line 1. ron@zoe:~/perl.modules$ perl -MCPAN -e 'install YAML::Syck' Can't locate object method "install" via package "YAML::Syck" at -e line 1. ron@zoe:~/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) "" Going to see a 7.4 nightly start on my OpenSolaris mediaserver soon!
root@fugly:/usr/local/squeezecenter-7.4-27400# ./slimserver.pl The following modules failed to load: YAML::Syck To download and compile them, please run: /usr/local/squeezecenter-7.4-27400/Bin/build-perl-modules.pl YAML::Syck Exiting..
Michael, this bug seems to not be a L10n, can you check?
Bret - please add some information about your system.
Setting proper component and assigned
It's not clear if this is a problem with your CPAN installation, or SC? Need more info.
Hello; With squeezecenter-7.4-27526-noCPAN; OpenSolaris - v5.10.0 built for i86pc-solaris Perl and all modules built with; [slimsrv@fugly] $ cc -Version cc: Sun C 5.10 SunOS_i386 2009/06/03 usage: cc [ options] files. Use 'cc -flags' for details [slimsrv@fugly] $ ./slimserver.pl The following modules failed to load: YAML::Syck To download and compile them, please run: /usr/local/squeezecenter-7.4-27526-noCPAN/Bin/build-perl-modules.pl YAML::Syck Exiting.. ==== But YAML::Syck is up to date (1.07). root@fugly:/usr/local/squeezecenter-7.4-27526-noCPAN/prefs# perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.9402) Enter 'h' for help. cpan[1]> install YAML::Syck CPAN: Storable loaded ok (v2.18) Going to read '/root/.cpan/Metadata' Database was generated on Mon, 13 Jul 2009 04:28:11 GMT CPAN: YAML loaded ok (v0.68) Going to read 57 yaml files from /root/.cpan/build/ CPAN: Time::HiRes loaded ok (v1.9711) ...........................................DONE Restored the state of none (in 0.5928 secs) YAML::Syck is up to date (1.07). == So I try to comment it out of the bootstrap.pm my @default_required_modules = qw(version Time::HiRes DBI DBD::SQLite EV XML::Parser::Expat HTML::Parser JSON::XS Digest::SHA1 GD Sub::Name); line. But now get; Use of inherited AUTOLOAD for non-method YAML::Syck::LoadYAML() is deprecated at /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/YAML/Syck.pm line 75, <FH> line 1. Log4perl: Seems like no initialization happened. Forgot to call init()? Use of inherited AUTOLOAD for non-method YAML::Syck::LoadYAML() is deprecated at /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/YAML/Syck.pm line 75, <FH> line 1. [09-07-14 19:38:49.5878] main::init (319) Starting Squeezebox Server (v7.4, r27526, Tue Jul 14 04:04:33 PDT 2009) perl 5.010000 Use of uninitialized value in pattern match (m//) at /usr/local/squeezecenter-7.4-27526-noCPAN/Slim/Utils/Prefs.pm line 323. [09-07-14 19:38:49.6010] Slim::Utils::Misc::msg (1160) Warning: [19:38:49.6009] Use of inherited AUTOLOAD for non-method YAML::Syck::LoadYAML() is deprecated at /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/YAML/Syck.pm line 75. [09-07-14 19:38:49.6018] Carp::croak (44) Warning: Can't locate auto/YAML/Syck/LoadYAML.al in @INC (@INC contains: /usr/local/squeezecenter-7.4-27526-noCPAN/Cache/InstalledPlugins /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris/auto /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10.0/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10.0/i86pc-solaris/auto /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris/auto /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/lib /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN /usr/local/squeezecenter-7.4-27526-noCPAN /usr/local/squeezecenter-7.4-27526-noCPAN /usr/local/lib/perl5/5.10.0/i86pc-solaris /usr/local/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/i86pc-solaris /usr/local/lib/perl5/site_perl/5.10.0 .) at /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/YAML/Syck.pm line 75 [09-07-14 19:38:49.6022] Slim::Utils::Misc::msg (1160) Warning: [19:38:49.6022] Use of inherited AUTOLOAD for non-method YAML::Syck::DumpYAML() is deprecated at /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/YAML/Syck.pm line 65. [09-07-14 19:38:49.6028] Slim::Utils::Prefs::Namespace::savenow (320) Error: can't save /usr/local/squeezecenter-7.4-27526-noCPAN/prefs/plugin/state.prefs: Can't locate auto/YAML/Syck/DumpYAML.al in @INC (@INC contains: /usr/local/squeezecenter-7.4-27526-noCPAN/Cache/InstalledPlugins /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris/auto /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10.0/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10.0/i86pc-solaris/auto /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris/auto /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/lib /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN /usr/local/squeezecenter-7.4-27526-noCPAN /usr/local/squeezecenter-7.4-27526-noCPAN /usr/local/lib/perl5/5.10.0/i86pc-solaris /usr/local/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/i86pc-solaris /usr/local/lib/perl5/site_perl/5.10.0 .) at /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/YAML/Syck.pm line 65 [09-07-14 19:38:49.6032] Slim::Utils::Misc::msg (1160) Warning: [19:38:49.6032] Use of inherited AUTOLOAD for non-method YAML::Syck::DumpYAML() is deprecated at /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/YAML/Syck.pm line 65. [09-07-14 19:38:49.6038] Slim::Utils::Prefs::Namespace::savenow (320) Error: can't save /usr/local/squeezecenter-7.4-27526-noCPAN/prefs/server.prefs: Can't locate auto/YAML/Syck/DumpYAML.al in @INC (@INC contains: /usr/local/squeezecenter-7.4-27526-noCPAN/Cache/InstalledPlugins /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris/auto /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10.0/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10.0/i86pc-solaris/auto /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/5.10/i86pc-solaris/auto /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/arch/i86pc-solaris /usr/local/squeezecenter-7.4-27526-noCPAN/lib /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN /usr/local/squeezecenter-7.4-27526-noCPAN /usr/local/squeezecenter-7.4-27526-noCPAN /usr/local/lib/perl5/5.10.0/i86pc-solaris /usr/local/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/i86pc-solaris /usr/local/lib/perl5/site_perl/5.10.0 .) at /usr/local/squeezecenter-7.4-27526-noCPAN/CPAN/YAML/Syck.pm line 65
Try deleting the CPAN/YAML directory. If you install modules system-wide where the versions don't match, you have to delete the version we ship in our CPAN dir.
Thanks Andy, That fixed it. How come if I downloaded the NOCPAN nightly I hit this problem?
The NoCPAN build is a bit misleading as it still includes the CPAN dir, just not the arch dir. We don't really want anyone running without the CPAN dir, as you'd likely have a ton of modules using different versions and it could cause strange bugs that are difficult to track down. Probably the NoCPAN build should remove the Perl half of binary modules, though, to fix issues like this one.