note
schwern
<code>
The other annoying warning is "Name ... used only once: possible typo...". For this I do this song-and-dance:
$DB::single = $DB::single = 1;
</code>
There's no warning if the variable already exists, which seems correct to me.
This does not warn.
<code>
use DB_File;
# Just some global in DB_File.
$DB_File::db_version = 42;
</code>
This does warn.
<code>
use DB_File;
$DB_File::wibble = 42;
</code>
PS The warning happens at compile time so the variable has to exist at compile time. This means:
<code>
require DB_File;
$DB_File::db_version = 42;
</code>
does warn.
475348
475348