Fw: RT: Use of uninitialized value in lc at/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914

Hi

Does anyone have thoughts on this warning message in the httpd logs

Kind regards

Naresh-----Original Message-----
From: Naresh Maharaj naresh@hewittandmay.com
Sender: rt-users-bounces@lists.bestpractical.com
Date: Wed, 19 Jan 2011 22:59:16
To: rt-users@lists.bestpractical.com
Subject: [rt-users] RT: Use of uninitialized value in lc at
/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914

All

We recently did a new install and have been having the same Warning in the
apache logs ever since.

This is where the issue starts:

Logs:
Jan 9 12:20:29 srikrsna yum[15593]: Installed:
perl-Apache-DBI-1.09-1.fc14.noarch
Jan 9 12:21:26 srikrsna RT: Use of uninitialized value in lc at
/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914.
(/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm:914)

Line 914 below highlighted with ****

sub apache_request_object
{
my $self = shift;
# We need to be careful to never assign a new apache (subclass)
# object to $r or we will leak memory, at least with mp1.
my $new_r = APACHE2 ? $
[0] : HTML::Mason::Apache::Request->new( $[0]
);
my $r_sub;
*** if ( lc $
[0]->dir_config(‘Filter’) eq ‘on’ )
{
die "To use Apache::Filter with Mason you must have at least version
1.021 of Apache::Filter\n"
unless Apache::Filter->VERSION >= 1.021;
$r_sub = $do_filter;
}
else
{
$r_sub = $no_filter;
}
my $apreq_instance =
APACHE2
? sub { Apache2::Request->new( $[0] ) }
: sub { $
[0] };
return
$r_sub->( $self->args_method eq ‘mod_perl’ ?
$apreq_instance->( $new_r ) :
$new_r
);
}

have seen the following post but could not see a solution:
http://www.gossamer-threads.com/lists/rt/users/96670

Does anyone know how I might be able to resolve this

Kind regards

Naresh Maharaj,

Hewitt & May (Shirtmakers) Ltd
email: info@hewittandmay.com
web: http://www.hewittandmay.co.uk

All - this is a bug in mod_perl v1/v2 capability detection in HTML::Mason.

Apr 29 12:22:01 xell RT: Use of uninitialized value in lc at
/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914.
(/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm:914)

Change this:

if ( lc $_[0]->dir_config('Filter') eq 'on' )

to this:

if ( defined( $_[0]->dir_config('Filter')) && lc

$_[0]->dir_config(‘Filter’) eq ‘on’ )

And that will silence the error message. I am CC’ing the HTML::Mason
list so they are aware.On 01/20/11 12:07, naresh@hewittandmay.com wrote:

Hi

Does anyone have thoughts on this warning message in the httpd logs

Kind regards

Naresh



*From: * Naresh Maharaj naresh@hewittandmay.com
*Sender: * rt-users-bounces@lists.bestpractical.com
*Date: *Wed, 19 Jan 2011 22:59:16 +0000
*To: *rt-users@lists.bestpractical.com
*Subject: *[rt-users] RT: Use of uninitialized value in lc at
/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914

All

We recently did a new install and have been having the same Warning in
the apache logs ever since.

This is where the issue starts:

Logs:
Jan 9 12:20:29 srikrsna yum[15593]: Installed:
perl-Apache-DBI-1.09-1.fc14.noarch
Jan 9 12:21:26 srikrsna RT: Use of uninitialized value in lc at
/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914.
(/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm:914)

Line 914 below highlighted with ****

sub_apache_request_object
{
my $self = shift;
# We need to be careful to never assign a new apache (subclass)
# object to $r or we will leak memory, at least with mp1.
my $new_r = APACHE2 ? $[0] : HTML::Mason::Apache::Request->new(
$
[0] );
my $r_sub;
*** if ( lc $[0]->dir_config(‘Filter’) eq ‘on’ )
{
die "To use Apache::Filter with Mason you must have at least
version 1.021 of Apache::Filter\n"
unless Apache::Filter->VERSION >= 1.021;
$r_sub = $do_filter;
}
else
{
$r_sub = $no_filter;
}
my $apreq_instance =
APACHE2
? sub { Apache2::Request->new( $
[0] ) }
: sub { $_[0] };
return
$r_sub->( $self->args_method eq ‘mod_perl’ ?
$apreq_instance->( $new_r ) :
$new_r
);
}

have seen the following post but could not see a solution:
http://www.gossamer-threads.com/lists/rt/users/96670

Does anyone know how I might be able to resolve this

Kind regards

Naresh Maharaj,

Hewitt & May (Shirtmakers) Ltd
email: info@hewittandmay.com mailto:info@hewittandmay.com
web: http://www.hewittandmay.co.uk