Tags:
create new tag
, view all tags

Question

I noticed a number of "uninitialized value in substitution" warnings in my httpd error log. The problem is on line 279 in the edit script from the latest beta. It ends up that $TWiki::script never gets initialized. My fix is to put line 279 into an if ( defined($TWiki::script) ) {} block. This elimitated the warning and should also work if $TWiki::script ever does get initialized.

And yes, this is just a warning and I can "safely" ignore it but I don't like these sort of messages cluttering up my error logs.

Environment

TWiki version: TWikiBetaRelease
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  

-- NormProffitt - 23 Feb 2004

Answer

mmm, John - can you comment?

the $script var was added my you in Jun2003 smile

in TWiki.pm, i found

---++ addScript( $extraScript )

Javascript that will be added to (some) template(s)
FIXME: This function is currently unused.  Remove on some non
documentation-only commit, unless use is planned in future.

=cut

sub addScript
{
    my( $extraScript ) = @_;
    $script .= "\n$extraScript";
}

-- SvenDowideit - 26 Feb 2004

I've removed this code from TWiki.pm in CVS - it's not called from any other files.

-- RichardDonkin - 02 Mar 2004

Topic revision: r4 - 2004-06-02 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.