Well if it is lexical shouldn't it suppress the warnings
anyhow? Remember that the 'use' is lexically inside the
BEGIN block where I have the pragma.
>From the command line:
perl -wc Apache/DBI.pm
produces the error while
perl -M-warnings=deprecated Apache/DBI.pm
doesn't.
Any in any case:
BEGIN {
no warnings qw(deprecated);
local $^W=0;
use Apache::DBI ();
}
doesn't suppress the error.
-P
-----Original Message-----
From: Ken Williams [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 10, 2000 8:22 AM
To: Paul G. Weiss
Cc: '[EMAIL PROTECTED]'
Subject: Re: Deprecated warnings in Apache::DBI
I don't have 5.6 to test this, but isn't the warnings pragma lexical and
not dynamic now? Which means it's doing the right thing.
Also, it's probably right - shouldn't Apache::DBI be changed?
Perhaps doing "local $^W;" instead of "no warnings qw(deprecated);" will
be a bandaid for you.
[EMAIL PROTECTED] (Paul G. Weiss) wrote:
>In my startup.pl I have
>
>BEGIN
>{
> no warnings qw(deprecated);
> use Apache::DBI;
>}
>
>yet when starting the server I always see
>
>defined(@array) is deprecated at
>/usrl1/home/pweiss/perl-56/lib/site_perl/5.6.0/Apache/DBI.pm line 135.
> (Maybe you should just omit the defined()?)
>
>
>Shouldn't 'no warnings' suppress this?
>
>-P
>
------------------- -------------------
Ken Williams Last Bastion of Euclidity
[EMAIL PROTECTED] The Math Forum