in reply to CDDBSearch does not install windows 7

Sorry i dodn't mention i installed libwww-perl. here is the modification i made to the test.pl script to see what was going on

use Net::CDDBSearch; $loaded = 1; print "ok 1\n"; $cddb = Net::CDDBSearch->new(DEBUG=>1); $cddb->get_albums_artist('Megadeth'); $albums = $cddb->albums(); push(@s,$_) foreach keys %{$albums}; if ($#s > 0) { print "ok 2\n"; } else { print "not ok 2\n"; } $cddb = Net::CDDBSearch->new(); $cddb->get_albums_album('Youthanasia'); $albums = $cddb->albums(); push(@a,$_) foreach keys %{$albums}; if ($#a > 0) { print "ok 3\n"; } else { print "not ok 3\n"; } $cddb = Net::CDDBSearch->new(); $cddb->get_songs_album($a[0]); $info = $cddb->info(); $tracks = $cddb->tracks(); if ($info->{Title} ne '') { print "ok 4\n"; } else { print "not ok 4\n +"; } push(@t,$_) foreach keys %{$tracks}; if ($#t > 0) { print "ok 5\n"; } else { print "not ok 5\n"; } output C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>perl test.pl 1..1 ok 1 Net::CDDBSearch=HASH(0x377d2c) >> Calling _get_albums(); Net::CDDBSearch=HASH(0x377d2c) >> Calling _get_url(); Net::CDDBSearch=HASH(0x377d2c) >> URL: http://www.freedb.org/freedb_se +arch.php?a llfields=NO&allcats=YES&grouping=none&words=Megadeth&fields=artist not ok 2 not ok 3 not ok 4 not ok 5 C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>C:\dnload\Net-CDDBSe +arch-2.01\ Net-CDDBSearch-2.01>perl test.pl 'C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01' is not recognized +as an inte rnal or external command, operable program or batch file. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>1..1 '1..1' is not recognized as an internal or external command, operable program or batch file. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>ok 1 'ok' is not recognized as an internal or external command, operable program or batch file. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>Net::CDDBSearch=HASH +(0x377d2c) >> Calling _get_albums(); The filename, directory name, or volume label syntax is incorrect. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>Net::CDDBSearch=HASH +(0x377d2c) >> Calling _get_url(); The filename, directory name, or volume label syntax is incorrect. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>Net::CDDBSearch=HASH +(0x377d2c) >> URL: http://www.freedb.org/freedb_search.php?a The filename, directory name, or volume label syntax is incorrect. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>llfields=NO&allcats= +YES&groupi ng=none&words=Megadeth&fields=artist 'llfields' is not recognized as an internal or external command, operable program or batch file. 'allcats' is not recognized as an internal or external command, operable program or batch file. 'grouping' is not recognized as an internal or external command, operable program or batch file. 'words' is not recognized as an internal or external command, operable program or batch file. 'fields' is not recognized as an internal or external command, operable program or batch file. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>not ok 2 'not' is not recognized as an internal or external command, operable program or batch file. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>not ok 3 'not' is not recognized as an internal or external command, operable program or batch file. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>not ok 4 'not' is not recognized as an internal or external command, operable program or batch file. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>not ok 5 'not' is not recognized as an internal or external command, operable program or batch file. C:\dnload\Net-CDDBSearch-2.01\Net-CDDBSearch-2.01>

any thoughts on what else i can try?

Rob i took the url produced by putting the test.pl in debug mode and copied and paste it into firefox and it works. I'm guessing it has something to do with the way the string is quoted before its sent. Maybe URI escape? Thanks dlita

Replies are listed 'Best First'.
Re^2: CDDBSearch does not install windows 7
by marto (Cardinal) on Nov 15, 2010 at 16:26 UTC

    Try adding a shebang line at the top of test.pl:

    #!/usr/bin/perl

    That said, if you actually read test.pl you're only creating one instance with the Debug option, as you see it creates a new one for subsequent tests. As I mentioned in the CB, the first test check to see if it can load the module, the subsequent tests actually test the six year old code against the freedb site. Chances are it (the site) may have changed and this module isn't scraping it properly anymore, or there is something going wrong with accessing webpages. I asked this previously but you've not responded.

Re^2: CDDBSearch does not install windows 7
by syphilis (Archbishop) on Nov 16, 2010 at 02:28 UTC
    any thoughts on what else i can try?

    I guess you could try fixing the module (... it looks broken to me). On Windows Vista, I'm getting the same as you when I run test.pl:
    1..1 ok 1 Net::CDDBSearch=HASH(0x2eb164) >> Calling _get_albums(); Net::CDDBSearch=HASH(0x2eb164) >> Calling _get_url(); Net::CDDBSearch=HASH(0x2eb164) >> URL: http://www.freedb.org/freedb_se +arch.php?a llfields=NO&allcats=YES&grouping=none&words=Megadeth&fields=artist not ok 2 not ok 3 not ok 4 not ok 5
    I expect the output would be the same on all operating systems, not just windows.
    The get_albums_artist and get_albums_album methods seem to be doing their job, but the albums method is not doing what it's supposed to do - perhaps this is the result of some re-structuring done to the website from which the information is being retrieved. I haven't checked.

    Cheers,
    Rob

    UPDATE: Don't be fooled by the 'PASS' reports from the cpan-testers. The first and only report that I checked, while purporting to be a 'PASS', should in fact be a 'FAIL'