M
Marc Girod
Hello,
I installed Strawberry perl 5.12.2 on my new laptop and started to
install my modules on it.
And I met some surprises. I'll mention 3, but the first is the one
that bothers me for now.
1. I got a new warning, and I'd like to understand whether it displays
a yet unknown problem (with perl up to 5.10) or should just be
silenced (with the next question of how?)
The warning is:
Subroutine exec redefined at C:/strawberry/perl/site/lib/Argv.pm line
852.
I get it in running a command line involving ClearCase::Wrapper::MGi.
This is hard to reproduce without ClearCase, even if the modules are
all on CPAN.
I tried to extract the significant code, but could not reproduce the
symptom.
So, here is my failed attempt at rproducing.
Could you please help me guessing what I could add to reproduce the
symptom, i.e. explain me what precisely it warns against?
There is indeed a redefinition of exec on line 852 of Argv.pm, but I
cannot see how it differes from the one below.
#!/usr/bin/perl
use warnings;
use strict;
package Foo;
sub exec {
print "overloaded in Foo\n";
}
sub new {
return bless {}, __PACKAGE__;
}
package Bar;
our @ISA = qw(Foo);
sub exec {
my $self = shift;
print "overloaded in Bar\n";
return $self->SUPER::exec;
}
sub new {
return bless {}, __PACKAGE__;
}
package main;
my $bar = new Bar;
$bar->exec;
exit 0;
This works the same on 5.12 as on 5.10:
$ ~/tmp/execdemo
overloaded in Bar
overloaded in Foo
2. Running: 'perl Makefile.PL' for all the modules I have tried
produces makefiles with a systematic syntax error:
double opening braces instead of single ones.
Running the following solves the problem:
W:\atcctest\Clone>perl -pi.bak -e "s/{{/{/g" Makefile
3. I fail to build the Clone package (from CPAN) with the following
error:
W:\atcctest\Clone>gmake
Skip blib\lib\Clone.pm (unchanged)
gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -
DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-
bitfields -DPERL_MSVCRT_READFIX -O3 -DVERSION=\"0.28\" -DXS_VERSION=
\"0.28\" "-IC:\strawberry\perl\lib\CORE" Clone.c
Clone.xs: In function 'sv_clone':
Clone.xs:160: error: duplicate case value
Clone.xs:154: error: previously used here
gmake: *** [Clone.o] Error 1
Thanks,
Marc
I installed Strawberry perl 5.12.2 on my new laptop and started to
install my modules on it.
And I met some surprises. I'll mention 3, but the first is the one
that bothers me for now.
1. I got a new warning, and I'd like to understand whether it displays
a yet unknown problem (with perl up to 5.10) or should just be
silenced (with the next question of how?)
The warning is:
Subroutine exec redefined at C:/strawberry/perl/site/lib/Argv.pm line
852.
I get it in running a command line involving ClearCase::Wrapper::MGi.
This is hard to reproduce without ClearCase, even if the modules are
all on CPAN.
I tried to extract the significant code, but could not reproduce the
symptom.
So, here is my failed attempt at rproducing.
Could you please help me guessing what I could add to reproduce the
symptom, i.e. explain me what precisely it warns against?
There is indeed a redefinition of exec on line 852 of Argv.pm, but I
cannot see how it differes from the one below.
#!/usr/bin/perl
use warnings;
use strict;
package Foo;
sub exec {
print "overloaded in Foo\n";
}
sub new {
return bless {}, __PACKAGE__;
}
package Bar;
our @ISA = qw(Foo);
sub exec {
my $self = shift;
print "overloaded in Bar\n";
return $self->SUPER::exec;
}
sub new {
return bless {}, __PACKAGE__;
}
package main;
my $bar = new Bar;
$bar->exec;
exit 0;
This works the same on 5.12 as on 5.10:
$ ~/tmp/execdemo
overloaded in Bar
overloaded in Foo
2. Running: 'perl Makefile.PL' for all the modules I have tried
produces makefiles with a systematic syntax error:
double opening braces instead of single ones.
Running the following solves the problem:
W:\atcctest\Clone>perl -pi.bak -e "s/{{/{/g" Makefile
3. I fail to build the Clone package (from CPAN) with the following
error:
W:\atcctest\Clone>gmake
Skip blib\lib\Clone.pm (unchanged)
gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -
DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-
bitfields -DPERL_MSVCRT_READFIX -O3 -DVERSION=\"0.28\" -DXS_VERSION=
\"0.28\" "-IC:\strawberry\perl\lib\CORE" Clone.c
Clone.xs: In function 'sv_clone':
Clone.xs:160: error: duplicate case value
Clone.xs:154: error: previously used here
gmake: *** [Clone.o] Error 1
Thanks,
Marc