Rabenschwinge has asked for the wisdom of the Perl Monks concerning the following question:
I have a problem with a phantom "die" statement:
Use of uninitialized value in die at ./correct-<censored>-buch.pl line 114. Died at ./correct-<censored>-buch.pl line 114.
However, this line does not contain a 'die', even though it used to. Currently it is: $update->execute(($autor, $titel, $verlag, $jahr, $ort, $auflage, $sprache, $einband, $seiten, $format, $stichwort, $sparteName, $lfdnr, $infotext, $preis_euro, $gewicht, $isbn)) or print "Fehler beim Aktualisieren von ISBN $isbn.\n";
I have tried reproducing the problem in a mini script, leaving the parameters for the update uninitialized or using a key for $isbn that does not exist. But not of that failed let alone caused the script to exit by a triggered "die" statement.
'$update' is defined as follows:
#!/usr/bin/env perl use strict; use warnings; use DBD::mysql; (...) my $updateStatement = "UPDATE `<censored>_buch` SET `autor` = ?, `titel` = ?, `verlag` = ?, `jahr` = ?, `ort` = ?, `auflage` = ?, `sprache` = ?, `einband` = ?, `seiten` = ?, `format` = ?, `stichwort` = ?, `sparteName` = ?, `lfdnr` = ?, `infotext` = ?, `preis_euro` = ?, `gewicht` = ? WHERE `isbn` = ? LIMIT 1"; (...) my $db = DBI->connect("DBI:mysql:database=<censored>;host=localhost;po +rt=3306", "<censored>", "<censored>"); my $update = $db->prepare($updateStatement) or die ($DBI::errstr);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: A phantom death
by moritz (Cardinal) on Dec 18, 2008 at 12:33 UTC | |
Re: A phantom death
by holli (Abbot) on Dec 18, 2008 at 13:40 UTC | |
by Anonymous Monk on Dec 18, 2008 at 13:42 UTC | |
Re: A phantom death
by derby (Abbot) on Dec 18, 2008 at 15:33 UTC | |
Re: A phantom death
by shmem (Chancellor) on Dec 18, 2008 at 18:05 UTC | |
Re: A phantom death
by jakobi (Pilgrim) on Sep 30, 2009 at 16:05 UTC | |
by jdporter (Paladin) on Sep 30, 2009 at 19:54 UTC |
Back to
Seekers of Perl Wisdom