Ask a Question related to PERL Modules, Design and Development.
-
Angus #1
FreeDB lookup error with Audio::CD
When I do a $cddb->lookup() twice in a row for the same disk, the
second lookup fails.
Short demo:
#!/usr/bin/perl -w
use strict;
use Audio::CD;
sub run_test {
my $device = shift;
my ($cd, $cddb, $data, $info, $cddb_t, $info_t, $i);
print "==== testing $device ", "="x40, "\n";
$cd = Audio::CD->init( $device );
$cddb = $cd->cddb();
$data = $cddb->lookup();
$info = $cd->stat();
$cddb_t = $data->tracks( $info );
$info_t = $info->tracks();
printf "Disk ID = %08x\n", $cddb->discid();
printf "Artist = %s\n", $data->artist();
printf "Album = %s\n", $data->title();
printf "Genre = %s\n", $data->genre();
printf "Tracks = %d\n", $info->total_tracks();
printf "Time = %2d:%02d\n", $info->time();
printf "Length = %2d:%02d\n", $info->length();
for ($i=0; $i<=$#{$cddb_t}; $i++) {
printf "%2d:%02d . %2d:%02d %s\n",
${$info_t}[$i]->pos(),
${$info_t}[$i]->length(),
${$cddb_t}[$i]->name();
}
}
run_test( '/dev/cdrom' );
run_test( '/dev/cdrom' );
The second call to run_test() produces blank data from the lookup().
It seems as though the module calls cddb_generate_unknown_entry() for
some reason. Am I failing to reset the module somehow? I'd really
like a work-around for this problem. Anyone have any suggestions?
Angus Guest
-
reverse lookup/domain lookup in PHP
http://www.whatismyipaddress.com/reverse.asp) to find the domain with PHP? I assume a DNS lookup requires an external server somewhere? you can... -
ERROR: cache lookup failed for type 0
Tzahi Fadida <tzahi_ml@myrealbox.com> writes: Um. The "clean" way to do this is to use BlessTupleDesc and then heap_formtuple. That requires... -
returning a setof tuples like a subquery was(ERROR:cache lookup failed for type 0 )
yes you were right it works now. 10x, sorry for the rookie mistake I jumped the gun on the last one. If you will i have another question on the... -
ERROR: cache lookup failed for type 0
Hi, I am learning how to use the c functions and my function below works when I do: select testgetrows(); but when I do select * from... -
[PHP] reverse lookup/domain lookup in PHP
From: "Tim Baker" <Tim.Baker@paconsulting.com> That's be great if there was a PHP function to do this, something like gethostbyaddr(), wouldn't...



Reply With Quote

