Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Bug fix - Import.pl

Quote Reply
Bug fix - Import.pl
The error message:[/code]# INSERT Links.
$db = new Links: BSQL "../defs/Links.def";
eval { require "links.def"; }; $@ and die "import: can't open 'categories.def' ($!)";
open (DB, "links.db") or die "import: can't open 'links.db' ($!)";[/code]
is wrong -- should be can't open 'Links.def'

Quote Reply
Re: Bug fix - Import.pl In reply to
Hello Mr. Pataki!

Very surprised that you found it now. This and few others were spotted by me

SINCE THE VERSION 1.0!

I told Alex to change it but I can understand why it has not been Wink
Quote Reply
Re: Bug fix - Import.pl In reply to
hehe..

even though it's so easy.. alex can't waste his time on something some of us will never see and some of us will only see once..

my dad (who is learning perl).. when i tell him to change something.. he always comes up with an excuse and tells me why he did it that way.. it makes me laugh sometimes.. but he is one of those people that don't have time to think about something else.. he's always busy doing something on his program.. for example.. once i told him to:

Code:
%stuff = map { $_ => 1 } @list;
$stuff{$value} ? return 1 : return undef;

instead of

Code:
foreach $item (@list) {
if ($item eq $value) {
return 1;
}
}

(fyi.. it's just a quicker way to see if a value is in a list by building up a hash of all values)

then he came up with some excuse that "map" was a perl 5 thing and he wanted to use code that was compatible with both perl 4 and 5 just in case he found a dedicated server that was cheap and it had perl 4..

hehe.. i took a peep at his code and yes.. he changed it Smile

jerry
Quote Reply
Re: Bug fix - Import.pl In reply to
It might be ... but if your error messages are wrong, you can spend a lot of time chasing your tail until you realize it Smile