Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

Useless use of a constant in void context at Makefile.PL line 467

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


carl at bl

Sep 30, 2003, 5:54 PM

Post #1 of 11 (2249 views)
Permalink
Useless use of a constant in void context at Makefile.PL line 467

Stas et al,

current CVS pull (as of this morning)

steel1: {173} perl mp2bug

-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

steel1: {167} perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs
Useless use of a constant in void context at Makefile.PL line 467.
steel1: {168}

The offending line is :

$string .= Apache::Test::install::nuke_Apache__test_target()

Is this some work in progress or something you need to know about?

2. Used Components and their Configuration:

*** mod_perl version 1.9911

*** using
/usr/local/perl-5.8.1/lib/site_perl/5.8.1/i386-netbsd/Apache/BuildConfig.pm
*** Makefile.PL options:
MP_APXS => /usr/local/apache2/bin/apxs
MP_COMPAT_1X => 1
MP_GENERATE_XS => 1
MP_LIBNAME => mod_perl
MP_USE_DSO => 1
MP_USE_STATIC => 1


*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.47
Server built: Jul 10 2003 10:10:41
Server's Module Magic Number: 20020903:4
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"


*** /usr/local/perl-5.8.1/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
Platform:
osname=netbsd, osvers=1.6.1, archname=i386-netbsd
uname='netbsd steel1.stealstopper.com 1.6.1 netbsd 1.6.1 (generic)
#0: tue apr 8 12:05:52 utc 2003
autobuild [at] tgm:autobuildnetbsd-1-6i386objautobuildnetbsd-1-6srcsysarchi386compilegeneric
i386 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -I/usr/pkg/include',
optimize='-O',
cppflags='-fno-strict-aliasing -I/usr/pkg/include'
ccversion='', gccversion='2.95.3 20010315 (release) (NetBSD nb3)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -Wl,-rpath,/usr/pkg/lib
-Wl,-rpath,/usr/local/lib -L/usr/pkg/lib -L/usr/local/lib'
libpth=/usr/pkg/lib /usr/local/lib /usr/lib
libs=-lm -lcrypt -lutil -lc -lposix
perllibs=-lm -lcrypt -lutil -lc -lposix
libc=/usr/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-R/usr/local/perl-5.8.1/lib/5.8.1/i386-netbsd/CORE'
cccdlflags='-DPIC -fPIC ', lddlflags='--whole-archive -shared
-L/usr/pkg/lib -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under netbsd
Compiled at Sep 26 2003 19:57:15
%ENV:
PERL_LWP_USE_HTTP_10="1"
@INC:
/usr/local/perl-5.8.1/lib/5.8.1/i386-netbsd
/usr/local/perl-5.8.1/lib/5.8.1
/usr/local/perl-5.8.1/lib/site_perl/5.8.1/i386-netbsd
/usr/local/perl-5.8.1/lib/site_perl/5.8.1
/usr/local/perl-5.8.1/lib/site_perl
.


3. This is the core dump trace: (if you get a core dump):

[CORE TRACE COMES HERE]

This report was generated by mp2bug on Wed Oct 1 00:52:11 2003 GMT.

-------------8<---------- End Bug Report --------------8<----------




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


stas at stason

Sep 30, 2003, 6:11 PM

Post #2 of 11 (2238 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

Carl Brewer wrote:

> current CVS pull (as of this morning)

> steel1: {167} perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs
> Useless use of a constant in void context at Makefile.PL line 467.
> steel1: {168}
>
> The offending line is :
>
> $string .= Apache::Test::install::nuke_Apache__test_target()
>
> Is this some work in progress or something you need to know about?

Nothing has changed since the 1.99_10 release in the build sw. Do you get a
different behavior if you try with 1.99_10? Also are you sure that the line is
reported correctly? Try to verify that the reported line is correct:

Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
retrieving revision 1.125
diff -u -r1.125 Makefile.PL
--- Makefile.PL 21 Sep 2003 03:05:18 -0000 1.125
+++ Makefile.PL 1 Oct 2003 01:08:05 -0000
@@ -464,6 +464,7 @@

EOF

+#line 467
$string .= Apache::Test::install::nuke_Apache__test_target()
if APACHE_TEST_INSTALL();



may be something is wrong with older Apache/BuildConfig.pm
> *** using
/usr/local/perl-5.8.1/lib/site_perl/5.8.1/i386-netbsd/Apache/BuildConfig.pm

try moving it elsewhere (don't delete it, so we can debug it if it's indeed
the one that causes the problem) and try again.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


carl at bl

Sep 30, 2003, 6:46 PM

Post #3 of 11 (2207 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

Stas Bekman wrote:


> Nothing has changed since the 1.99_10 release in the build sw. Do you
> get a different behavior if you try with 1.99_10? Also are you sure that
> the line is reported correctly? Try to verify that the reported line is
> correct:

I'll have a play with this tonight when I get home :)

I'll also see what I can do with the IPv6 problems.

Carl




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


carl at bl

Oct 15, 2003, 7:10 PM

Post #4 of 11 (2233 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

Stas Bekman wrote:

> Carl Brewer wrote:
>
>> current CVS pull (as of this morning)

I just pulled the very latest mp2 CVS down, and am still
seeing this error :

>
>
>> steel1: {167} perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs
>> Useless use of a constant in void context at Makefile.PL line 467.
>> steel1: {168}
>>
>> The offending line is :
>>
>> $string .= Apache::Test::install::nuke_Apache__test_target()
>>
>> Is this some work in progress or something you need to know about?
>
>
> Nothing has changed since the 1.99_10 release in the build sw. Do you
> get a different behavior if you try with 1.99_10? Also are you sure that
> the line is reported correctly? Try to verify that the reported line is
> correct:
>
> Index: Makefile.PL
> ===================================================================
> RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
> retrieving revision 1.125
> diff -u -r1.125 Makefile.PL
> --- Makefile.PL 21 Sep 2003 03:05:18 -0000 1.125
> +++ Makefile.PL 1 Oct 2003 01:08:05 -0000
> @@ -464,6 +464,7 @@
>
> EOF
>
> +#line 467
> $string .= Apache::Test::install::nuke_Apache__test_target()
> if APACHE_TEST_INSTALL();
>
>
>
> may be something is wrong with older Apache/BuildConfig.pm
> > *** using
> /usr/local/perl-5.8.1/lib/site_perl/5.8.1/i386-netbsd/Apache/BuildConfig.pm
>
> try moving it elsewhere (don't delete it, so we can debug it if it's
> indeed the one that causes the problem) and try again.

I moved it, but the same problem occurs.

Any suggestions?

Carl



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


stas at stason

Oct 15, 2003, 10:34 PM

Post #5 of 11 (2217 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

Carl Brewer wrote:
> Stas Bekman wrote:
>
>> Carl Brewer wrote:
>>
>>> current CVS pull (as of this morning)
>
>
> I just pulled the very latest mp2 CVS down, and am still
> seeing this error :
>
>>
>>
>>> steel1: {167} perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs
>>> Useless use of a constant in void context at Makefile.PL line 467.
>>> steel1: {168}
>>>
>>> The offending line is :
>>>
>>> $string .= Apache::Test::install::nuke_Apache__test_target()
>>>
>>> Is this some work in progress or something you need to know about?
>>
>>
>>
>> Nothing has changed since the 1.99_10 release in the build sw. Do you
>> get a different behavior if you try with 1.99_10? Also are you sure
>> that the line is reported correctly? Try to verify that the reported
>> line is correct:
>>
>> Index: Makefile.PL
>> ===================================================================
>> RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
>> retrieving revision 1.125
>> diff -u -r1.125 Makefile.PL
>> --- Makefile.PL 21 Sep 2003 03:05:18 -0000 1.125
>> +++ Makefile.PL 1 Oct 2003 01:08:05 -0000
>> @@ -464,6 +464,7 @@
>>
>> EOF
>>
>> +#line 467
>> $string .= Apache::Test::install::nuke_Apache__test_target()
>> if APACHE_TEST_INSTALL();
>>
>>
>>
>> may be something is wrong with older Apache/BuildConfig.pm
>> > *** using
>> /usr/local/perl-5.8.1/lib/site_perl/5.8.1/i386-netbsd/Apache/BuildConfig.pm
>>
>>
>> try moving it elsewhere (don't delete it, so we can debug it if it's
>> indeed the one that causes the problem) and try again.
>
>
> I moved it, but the same problem occurs.

So the offending line is:

$string .= Apache::Test::install::nuke_Apache__test_target()
if APACHE_TEST_INSTALL();

You lost the actual constant that it was complaining about ;) I should have
looked closer.

Any change if you replace it with:

if (APACHE_TEST_INSTALL()) {
$string .= Apache::Test::install::nuke_Apache__test_target();
}

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas [at] stason http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


carl at bl

Oct 16, 2003, 7:56 PM

Post #6 of 11 (2201 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

Stas Bekman wrote:


>
> So the offending line is:
>
> $string .= Apache::Test::install::nuke_Apache__test_target()
> if APACHE_TEST_INSTALL();
>
> You lost the actual constant that it was complaining about ;) I should
> have looked closer.
>
> Any change if you replace it with:
>
> if (APACHE_TEST_INSTALL()) {
> $string .= Apache::Test::install::nuke_Apache__test_target();
> }

Nope, same error.

cheers

Carl




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


stas at stason

Oct 17, 2003, 12:22 AM

Post #7 of 11 (2231 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

Carl Brewer wrote:
> Stas Bekman wrote:
>
>
>>
>> So the offending line is:
>>
>> $string .= Apache::Test::install::nuke_Apache__test_target()
>> if APACHE_TEST_INSTALL();
>>
>> You lost the actual constant that it was complaining about ;) I should
>> have looked closer.
>>
>> Any change if you replace it with:
>>
>> if (APACHE_TEST_INSTALL()) {
>> $string .= Apache::Test::install::nuke_Apache__test_target();
>> }
>
>
> Nope, same error.

OK, what happens if you replace that line with:

print APACHE_TEST_INSTALL ? "APACHE_TEST_INSTALL" : "NOT APACHE_TEST_INSTALL";
$string .= Apache::Test::install::nuke_Apache__test_target();

does it complain about the print line, or the $string one?

Also what happens if you change

BEGIN {
use constant APACHE_TEST_INSTALL => -e 'Apache-Test';
use lib './Apache-Test';
require 'install-pl' if APACHE_TEST_INSTALL;
}

to:

BEGIN {
use constant APACHE_TEST_INSTALL => -e 'Apache-Test';
use lib './Apache-Test';
if (APACHE_TEST_INSTALL) {
warn "loading install-pl';
require 'install-pl';
}
}

does it print "loading install-pl"?

Finally try replacing:

require 'install-pl';
with
require './install-pl';


__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas [at] stason http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


carl at bl

Oct 28, 2003, 5:06 PM

Post #8 of 11 (2216 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

Stas Bekman wrote:

> Carl Brewer wrote:
>
>> Stas Bekman wrote:
>>
>>
>>>
>>> So the offending line is:
>>>
>>> $string .= Apache::Test::install::nuke_Apache__test_target()
>>> if APACHE_TEST_INSTALL();
>>>
>>> You lost the actual constant that it was complaining about ;) I
>>> should have looked closer.
>>>
>>> Any change if you replace it with:
>>>
>>> if (APACHE_TEST_INSTALL()) {
>>> $string .= Apache::Test::install::nuke_Apache__test_target();
>>> }
>>
>>
>>
>> Nope, same error.
>
>
> OK, what happens if you replace that line with:
>
> print APACHE_TEST_INSTALL ? "APACHE_TEST_INSTALL" : "NOT
> APACHE_TEST_INSTALL";
> $string .= Apache::Test::install::nuke_Apache__test_target();
>
> does it complain about the print line, or the $string one?

It's complainign abuot the test line :

if (APACHE_TEST_INSTALL()) {


>
> Also what happens if you change
>
> BEGIN {
> use constant APACHE_TEST_INSTALL => -e 'Apache-Test';
> use lib './Apache-Test';
> require 'install-pl' if APACHE_TEST_INSTALL;
> }
>
> to:
>
> BEGIN {
> use constant APACHE_TEST_INSTALL => -e 'Apache-Test';

I think this is the bit that isn't working. The constant isn't being
set, so the -e 'Apache-Test' test is failing.

This would be consistant with there being no such directory if you
do a straight CVS checkout, rather than untar'ing a distribution
and then using CVS updates. Is this something we need to fix in
the CVS tree, or something?




> use lib './Apache-Test';
> if (APACHE_TEST_INSTALL) {
> warn "loading install-pl';
> require 'install-pl';
> }
> }
>
> does it print "loading install-pl"?

no

>
> Finally try replacing:
>
> require 'install-pl';
> with
> require './install-pl';

Done, no change

Carl




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


stas at stason

Oct 28, 2003, 5:29 PM

Post #9 of 11 (2226 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

Carl Brewer wrote:
[...]
>> Also what happens if you change
>>
>> BEGIN {
>> use constant APACHE_TEST_INSTALL => -e 'Apache-Test';
>> use lib './Apache-Test';
>> require 'install-pl' if APACHE_TEST_INSTALL;
>> }
>>
>> to:
>>
>> BEGIN {
>> use constant APACHE_TEST_INSTALL => -e 'Apache-Test';
>
>
> I think this is the bit that isn't working. The constant isn't being
> set, so the -e 'Apache-Test' test is failing.

What do you mean by 'the constant not being set"? It's either true or false,
bu it's always set. Does this work for you?

perl -lwe 'use constant A => -e "Apache-Test1"; print A ? "OK" : "NOT OK";'
NOT OK
perl -lwe 'use constant A => -e "Apache-Test"; print A ? "OK" : "NOT OK";'
OK

it's fine if Apache-Test is not there. APACHE_TEST_INSTALL should return false.

> This would be consistant with there being no such directory if you
> do a straight CVS checkout, rather than untar'ing a distribution
> and then using CVS updates. Is this something we need to fix in
> the CVS tree, or something?

Actually, it's not. If you do a fresh checkout, you get Apache-Test checked
out as well. Only if you remove it and do 'cvs up' it won't re-fetch that
directory.

But now that you told me the circumstances the problem happens at, I'm able to
reproduce it, after removing 'Apache-Test'. So I'll fix it ;)

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas [at] stason http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


stas at stason

Oct 28, 2003, 5:44 PM

Post #10 of 11 (2207 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

It's now fixed in cvs. Apparently constants don't seem to work when moved into
a different namespace. May be a bug in perl, may be that's how it should be.
In any case, moving to lexical variable solves the problem.

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas [at] stason http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


carl at bl

Oct 28, 2003, 11:47 PM

Post #11 of 11 (2206 views)
Permalink
Re: Useless use of a constant in void context at Makefile.PL line 467 [In reply to]

Stas Bekman wrote:

> It's now fixed in cvs. Apparently constants don't seem to work when
> moved into a different namespace. May be a bug in perl, may be that's
> how it should be. In any case, moving to lexical variable solves the
> problem.

Magic,

thanks Stas :)

Carl




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.