==================================================================
Please DO NOT REPLY to this mail or send email to the developers
about this bug. Please follow-up to Bugzilla using this
link:http://bugs.contribs.org/show_bug.cgi?id=8319
Have you checked the Frequently Asked Questions (FAQ)?
http://wiki.contribs.org/SME_Server:Documentation:FAQ
Please also take the time to read the following useful guide:
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
==================================================================
Bug ID: 8319
Summary: "my" variable masks earlier declaration in same scope
at wbl.pm
Classification: Contribs
Product: SME Contribs
Version: 8.1
Hardware: ---
OS: ---
Status: CONFIRMED
Severity: normal
Priority: P3
Component: smeserver-wbl
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Just noticed errors from wbl.pm in my admin_error_log
I did a command line run and got the following errors :
[root@home ~]# perl /usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm
"my" variable %list masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 193.
"my" variable $parameter masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 194.
"my" variable $value masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 195.
"my" variable %list masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 250.
"my" variable $parameter masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 251.
"my" variable $value masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 252.
"my" variable %list masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 270.
"my" variable $parameter masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 271.
"my" variable $value masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 272.
"my" variable %list masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 290.
"my" variable $parameter masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 291.
"my" variable $value masks earlier declaration in same scope at
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm line 292.
I'm not sure why it has changed.
I *think* the problems are in the two subroutines :
sub create_modify_black
sub create_modify_white
There seems to be several occurrences of
my %list = 'something'
within the same subroutine
e.g.:
# qmail badhelo
my %list = $wdb->get('badhelo')->props;
my $parameter = "";
my $value = "";
...........etc
then a little further down in the same subroutine :
# qmail badmailfrom
my %list = $wdb->get('badmailfrom')->props;
my $parameter = "";
my $value = "";
while (($parameter,$value) = each(%list)) {
if ($parameter eq "type") {next;}
Can you 'unset' these variable to reuse them or should you use a different
individual variable e.g. change my %list to my %badhelolist and my
%badmailfromlist ?
I just tried making the variables unique which clears the error. Is there a
better way ?
--
You are receiving this mail because:
You are the QA Contact for the bug.
_______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at http://lists.contribs.org/mailman/public/contribteam/