Question
[Fri Jun 30 13:20:51 2006] [error] [client 192.168.0.125] [Fri Jun 30 13:20:51 2006] view: Use of uninitialized value in string eq at /home/twiki/htdocs/lib/TWiki/Plugins/TreeBrowserPlugin.pm line 103.
Environment
--
TraceyMaule - 30 Jun 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
The plugin fails 'use strict', including the variable referenced on that line, which probably has something to do with it.
--
MeredithLesly - 30 Jun 2006
I am unable to reproduce this. Do you get the same result if you use this plugin only with the default set? (Disable the other plugins temporarily to try this out).
What version of the plugin are you using?
--
SteffenPoulsen - 30 Jun 2006
There's no need to make this person jump through hoops. One of the variables on line 103 is undefined because it hasn't been declared in a package.
use strict catches these errors.
--
MeredithLesly - 30 Jun 2006
That sounds plausible - do you have an idea why this is not reproducible also?
--
SteffenPoulsen - 30 Jun 2006
It's not "plausible": it's a fact. If a variable isn't given a value, it's undefined. Using an undefined variable in contexts such as
$foo eq $bar is a bug.
--
MeredithLesly - 30 Jun 2006
Ok, let me rephrase. How come I am out of luck provoking a "Use of uninitialized value", reproducing the problem?
--
SteffenPoulsen - 30 Jun 2006
Dumb luck? Doesn't make the code right.
--
MeredithLesly - 30 Jun 2006
And doesn't make me any less ignorant either :-/.
--
SteffenPoulsen - 30 Jun 2006
I'm not going to research
FastCGI to see if it's compensating or whether it
is just dumb luck that you're not having problems. It doesn't matter, in the end. Perl modules should have
use strict; in them. Period. Surely you have a perl manual or can find relevant information by googling.
--
MeredithLesly - 30 Jun 2006
I think it is a good idea to use
use strict. I find some confidence in being able to reproduce and understand stuff as well.
I think it is ok you can't help me with this one.
--
SteffenPoulsen - 30 Jun 2006
I have uploaded a new version from SVN, please check if the new version will work for you.
--
SteffenPoulsen - 02 Jul 2006
um... new version? of
QuickMenuSkin? I went to download but the last revision was 27 June and i have downloaded new version since then?
--
TraceyMaule - 02 Jul 2006
New version of
TreeBrowserPlugin
--
MeredithLesly - 02 Jul 2006
oh sorry.. early monday morning
--
TraceyMaule - 02 Jul 2006