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

5.19.x changes documented behavior for creating inline subs, revert it #13819

Closed
p5pRT opened this issue May 10, 2014 · 4 comments
Closed

5.19.x changes documented behavior for creating inline subs, revert it #13819

p5pRT opened this issue May 10, 2014 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented May 10, 2014

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

Searchable as RT121842$

@p5pRT
Copy link
Author

p5pRT commented May 10, 2014

From @avar

Created by @avar

As discussed in
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=24250#txn-1291322 I think
we should back out the fix in 5.19.x to make this example print "79908", at the
cost of breaking the commonly used and documented since 5.003 method
of dynamically creating inlinable subroutines​:

  BEGIN {
  my $x = 79907;
  *RT_79908 = sub () { $x };
  $x++;
  }
  print RT_79908(); # prints 79907 in 5.18, 79908 in 5.19.x

I've just pushed a avar/rv-fix-79908-and-add-docs which fixes that and
improves the perlsub documentation​:

  http​://perl5.git.perl.org/perl.git/commitdiff/ef01eb7fb201acaa520a942ff9fcd395197b46e3
  http​://perl5.git.perl.org/perl.git/commitdiff/b255f2ccbaf0f41d51ca2a28f405f57c02fa7426

I propose that this be merged in before 5.20.x is released, and I'm
filing this bug so it can be proposed as a blocker of RT #116923
("[META] tickets blocking the release of perl 5.20.0"), instead of
just making the now re-opened RT #79908 the blocker, we may want a
different long-term fix for this than just documenting the behavior as
I've done.

Perl Info

Flags:
    category=core
    severity=high

Site configuration information for perl 5.19.12:

Configured by avar at Sat May 10 09:37:00 UTC 2014.

Summary of my perl5 (revision 5 version 19 subversion 12) configuration:
  Local Commit: b255f2ccbaf0f41d51ca2a28f405f57c02fa7426
  Ancestor: f78f6d13e94ec2059acb931e3ca33869aa58f1e7
  Platform:
    osname=linux, osvers=3.2.0-4-amd64, archname=x86_64-linux-thread-multi
    uname='linux u.nix.is 3.2.0-4-amd64 #1 smp debian 3.2.35-2 x86_64 gnulinux '
    config_args='-DDEBUGGING=both -Doptimize=-ggdb3 -Dusethreads -Dprefix=/home/avar/perl5/installed -Dusedevel -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    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='-ggdb3',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.2.1 Compatible Debian Clang 3.3 (branches/release_33)', 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 /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=libc-2.18.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.18'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -ggdb3 -L/usr/local/lib -fstack-protector'

Locally applied patches:
    ef01eb7fb201acaa520a942ff9fcd395197b46e3
    b255f2ccbaf0f41d51ca2a28f405f57c02fa7426


@INC for perl 5.19.12:
    lib
    /home/avar/perl5/installed/lib/site_perl/5.19.12/x86_64-linux-thread-multi
    /home/avar/perl5/installed/lib/site_perl/5.19.12
    /home/avar/perl5/installed/lib/5.19.12/x86_64-linux-thread-multi
    /home/avar/perl5/installed/lib/5.19.12
    .


Environment for perl 5.19.12:
    HOME=/home/avar
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/v-perlbrew/perl5/perlbrew/perls/perl-5.19.6/bin:/home/avar/g/misc-scripts:/home/avar/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
    PERLDOC=-MPod::Text::Ansi
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented May 12, 2014

From @rjbs

Merged.

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented May 12, 2014

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

@p5pRT
Copy link
Author

p5pRT commented May 12, 2014

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

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