develooper Front page | perl.perl5.porters | Postings from August 2016

[perl #128910] [PATCH] Remove state (@a) claim from perldiag

Thread Previous
August 12, 2016 15:47
[perl #128910] [PATCH] Remove state (@a) claim from perldiag
Message ID:
# New Ticket Created by  Smylers 
# Please include the string:  [perl #128910]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.40 running under perl 5.25.2.


I was surprised to see perldiag making a claim about a feature being
added to a future version of Perl, namely:

   Constructions such as "state (@a) = foo()" will be supported in a
   future perl release.

That's in the description for ‘Initialization of state variables in list
context currently forbidden’.

perldiag doesn't seem like a good place to announce forthcoming
features, especially if they don't actually turn out to be forthcoming:
the above claim was added in 2009.

Implementing the feature is RT# 114932, most recently updated in 2013,
and without agreement on the desired behaviour:

So I think it's better to remove the claim about a future feature,
simply documenting the situation as it is now.

I also tweaked the wording to make it more obvious that state can only
be applied to a single scalar variable at at time, and gave a suggestion
as to what to do if you're trying to use state with an array or hash.

----------------------------------------------------------------- ---
Flags: category=docs severity=low Type=Patch PatchStatus=HasPatch ---
Site configuration information for perl 5.25.2:

Configured by smylers at Tue May 31 13:40:14 BST 2016.

Summary of my perl5 (revision 5 version 25 subversion 2) configuration:
  Commit id: bdc905d035d4f835a808f1825dad9a8cd726d1ec
    osname=linux, osvers=3.13.0-85-generic, archname=x86_64-linux
    uname='linux fozzie 3.13.0-85-generic #129-ubuntu smp thu mar 17 20:50:15 utc 2016 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Dusedevel'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.8.4', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    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/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /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=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

@INC for perl 5.25.2:

Environment for perl 5.25.2:
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    PERL_CPANM_OPT=--sudo --prompt

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About