Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] given-when clause not work properly when -T is specified #11464

Closed
p5pRT opened this issue Jun 27, 2011 · 15 comments
Closed

[BUG] given-when clause not work properly when -T is specified #11464

p5pRT opened this issue Jun 27, 2011 · 15 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 27, 2011

Migrated from rt.perl.org#93590 (status was 'resolved')

Searchable as RT93590$

@p5pRT
Copy link
Author

p5pRT commented Jun 27, 2011

From @qiuhw

Hi,
The attached is a test file demonstrate that the given-when clause not
work properly when -T is specified on the command line. However, without
the -T command option, it works ok.
I test the example with Perl v5.12.4, v5.14.1 and v5.15.0, only v5.12.4
tests ok while the other two test nok.
If the $chr is not read from a file, then all is ok. And also, If I
write ['M', 'm'] instead of ['m', 'M'] then all is ok too. (/m/i also
works fine, of course.)

@p5pRT
Copy link
Author

p5pRT commented Jun 27, 2011

From @qiuhw

test.pl

@p5pRT
Copy link
Author

p5pRT commented Sep 11, 2011

From @cpansprout

On Sun Jun 26 19​:34​:52 2011, qiuhw wrote​:

Hi,
The attached is a test file demonstrate that the given-when clause not
work properly when -T is specified on the command line. However, without
the -T command option, it works ok.
I test the example with Perl v5.12.4, v5.14.1 and v5.15.0, only v5.12.4
tests ok while the other two test nok.
If the $chr is not read from a file, then all is ok. And also, If I
write ['M', 'm'] instead of ['m', 'M'] then all is ok too. (/m/i also
works fine, of course.)

I cannot reproduce this at all. What OS are you using?

@p5pRT
Copy link
Author

p5pRT commented Sep 11, 2011

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 12, 2011

From @qiuhw

在 2011-09-11 16​:47​:37 星期日 时,sprout 写到:

I cannot reproduce this at all. What OS are you using?

Hope the following helps.

$ perl -V
Summary of my perl5 (revision 5 version 14 subversion 1) configuration​:

  Platform​:
  osname=linux, osvers=2.6.38.8-32.fc15.x86_64,
archname=x86_64-linux-thread-multi
  uname='linux wind.river 2.6.38.8-32.fc15.x86_64 #1 smp mon jun 13
19​:49​:05 utc 2011 x86_64 x86_64 x86_64 gnulinux '
  config_args='-DDEBUGGING -Dusethreads -Duseshrplib -des
-Dprefix=/home/qiuhw/soft/perl-5.14.1'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2 -g',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.6.0 20110530 (Red Hat 4.6.0-9)',
gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /usr/lib
/lib64 /usr/lib64 /usr/local/lib64
  libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=, so=so, useshrplib=true, libperl=libperl.so
  gnulibc_version='2.14'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/home/qiuhw/soft/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi/CORE'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib
-fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
  PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
  PERL_PRESERVE_IVUV PERL_TRACK_MEMPOOL USE_64_BIT_ALL
  USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
  USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
  Built under linux
  Compiled at Jun 22 2011 23​:33​:12
  %ENV​:
 
PERL5LIB="/home/qiuhw/soft/hpv_pipeline-0.18.1/lib/perl5​:/home/qiuhw/soft/gass-tmp/lib/perl5"
  PERL6LIB="/home/qiuhw/.perl6/lib​:/home/qiuhw/.perl6/lib​:"
  @​INC​:
  /home/qiuhw/soft/hpv_pipeline-0.18.1/lib/perl5/x86_64-linux-thread-multi
  /home/qiuhw/soft/hpv_pipeline-0.18.1/lib/perl5
  /home/qiuhw/soft/gass-tmp/lib/perl5
 
/home/qiuhw/soft/perl-5.14.1/lib/site_perl/5.14.1/x86_64-linux-thread-multi
  /home/qiuhw/soft/perl-5.14.1/lib/site_perl/5.14.1
  /home/qiuhw/soft/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi
  /home/qiuhw/soft/perl-5.14.1/lib/5.14.1

@p5pRT
Copy link
Author

p5pRT commented Sep 12, 2011

From @qiuhw

On 09/12/2011 07​:47 AM, Father Chrysostomos via RT wrote​:

I cannot reproduce this at all. What OS are you using?
Hope the following helps.

$ perl -V
Summary of my perl5 (revision 5 version 14 subversion 1) configuration​:

  Platform​:
  osname=linux, osvers=2.6.38.8-32.fc15.x86_64,
archname=x86_64-linux-thread-multi
  uname='linux wind.river 2.6.38.8-32.fc15.x86_64 #1 smp mon jun 13
19​:49​:05 utc 2011 x86_64 x86_64 x86_64 gnulinux '
  config_args='-DDEBUGGING -Dusethreads -Duseshrplib -des
-Dprefix=/home/qiuhw/soft/perl-5.14.1'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2 -g',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.6.0 20110530 (Red Hat 4.6.0-9)',
gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /usr/lib
/lib64 /usr/lib64 /usr/local/lib64
  libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=, so=so, useshrplib=true, libperl=libperl.so
  gnulibc_version='2.14'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/home/qiuhw/soft/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi/CORE'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib
-fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
  PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
  PERL_PRESERVE_IVUV PERL_TRACK_MEMPOOL
USE_64_BIT_ALL
  USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
  USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
  Built under linux
  Compiled at Jun 22 2011 23​:33​:12
  %ENV​:
 
PERL5LIB="/home/qiuhw/soft/hpv_pipeline-0.18.1/lib/perl5​:/home/qiuhw/soft/gass-tmp/lib/perl5"
  PERL6LIB="/home/qiuhw/.perl6/lib​:/home/qiuhw/.perl6/lib​:"
  @​INC​:
 
/home/qiuhw/soft/hpv_pipeline-0.18.1/lib/perl5/x86_64-linux-thread-multi
  /home/qiuhw/soft/hpv_pipeline-0.18.1/lib/perl5
  /home/qiuhw/soft/gass-tmp/lib/perl5
 
/home/qiuhw/soft/perl-5.14.1/lib/site_perl/5.14.1/x86_64-linux-thread-multi
  /home/qiuhw/soft/perl-5.14.1/lib/site_perl/5.14.1
  /home/qiuhw/soft/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi
  /home/qiuhw/soft/perl-5.14.1/lib/5.14.1

@p5pRT
Copy link
Author

p5pRT commented Sep 18, 2011

From @cpansprout

On Mon Sep 12 12​:43​:30 2011, qiuhw wrote​:

On 09/12/2011 07​:47 AM, Father Chrysostomos via RT wrote​:

I cannot reproduce this at all. What OS are you using?
Hope the following helps.

$ perl -V
Summary of my perl5 (revision 5 version 14 subversion 1)
configuration​:

Platform​:
osname=linux, osvers=2.6.38.8-32.fc15.x86_64,
archname=x86_64-linux-thread-multi

I don’t have access to such a machine to test it.

Dave Mitchell recently fixed a bug that had to do with given’s implicit
lexical $_. See <http​://perl5.git.perl.org/perl.git/commit/87e4a53a89>.
Could that have fixed it (and be the reason why I cannot reproduce the
bug)? Could you test it with the latest bleadperl?

@p5pRT
Copy link
Author

p5pRT commented Sep 19, 2011

From @qiuhw

On 09/19/2011 04​:32 AM, Father Chrysostomos via RT wrote​:

Dave Mitchell recently fixed a bug that had to do with given’s implicit
lexical $_. See<http​://perl5.git.perl.org/perl.git/commit/87e4a53a89>.
Could that have fixed it (and be the reason why I cannot reproduce the
bug)? Could you test it with the latest bleadperl?
The same error with the latest bleadperl.

BTW. I find out that I had uploaded the wrong test file. Line 16 should
read as

  when (['m', 'M']) { ok(1) }

Sorry for my carelessness. The fixed test file is attached.

@p5pRT
Copy link
Author

p5pRT commented Sep 19, 2011

From @qiuhw

test.pl

@p5pRT
Copy link
Author

p5pRT commented Sep 21, 2011

From @cpansprout

Fixed by be88a5c.

@p5pRT
Copy link
Author

p5pRT commented Sep 21, 2011

@cpansprout - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Sep 21, 2011
@p5pRT
Copy link
Author

p5pRT commented Sep 21, 2011

From @cpansprout

This bug is a new regression in 5.14. I would like to nominate
be88a5c (which fixes it) for 5.14.3.

1 similar comment
@p5pRT
Copy link
Author

p5pRT commented Sep 21, 2011

From @cpansprout

This bug is a new regression in 5.14. I would like to nominate
be88a5c (which fixes it) for 5.14.3.

@p5pRT
Copy link
Author

p5pRT commented Sep 21, 2011

From [Unknown Contact. See original ticket]

This bug is a new regression in 5.14. I would like to nominate
be88a5c (which fixes it) for 5.14.3.

@p5pRT
Copy link
Author

p5pRT commented Sep 21, 2011

From @xdg

On Wed, Sep 21, 2011 at 1​:16 AM, Father Chrysostomos via RT
<perlbug-comment@​perl.org> wrote​:

This bug is a new regression in 5.14.  I would like to nominate
be88a5c (which fixes it) for 5.14.3.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant