Mail Index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ApacheGallery] Useless use of private variable in void context

Hello [email protected] !

I found strange (for me) thing in
When gallery is running under apache 1.3.x and mod_perl 1, you will
get "Useless use of private variable in void context " in your error
log. This happens in this code:
1423> my $quality = $r->dir_config('GalleryQuality');
      if ($quality && $quality =~ m/^\d+$/) {
This happens only at first attempt of this procedure, after that perl
doesn't complain. I'm not familiar with perl, so i don't know what the
problem is, but these messages in logs bothered me a little.
i thought the reason of complaint is that $quality is empty and it
gets evaluated twice in this if clause.
i changed code to :
 my $quality = $r->dir_config('GalleryQuality');
 if ($quality) {
   if ($quality =~ m/^\d+$/) {
and complaints stopped.
p.s. This only happens under apache 1.3 and mod_perl 1, under apache
2.0 and mod_perl 2 everything is ok.
best regards to AG users and happy new year!

Evgeny Stepanov
[email protected]

users mailing list
[email protected]