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

ref function returns 'Regexp', not 'REGEXP' for qr// #16801

Closed
p5pRT opened this issue Jan 3, 2019 · 19 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Jan 3, 2019

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

Searchable as RT133751$

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 3, 2019

From @djerius

Created by @djerius

The documentation for the ref() function indicates that it
returns 'REGEXP' for regular expressions. Actually,
it returns 'Regexp'​:

% perl -le 'print ref( qr// )'
Regexp

As far as I can recall (and verified with Perl 5.8.8) it has
always retrned 'Regexp'.

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.28.1:

Configured by dj at Mon Dec 17 10:30:49 EST 2018.

Summary of my perl5 (revision 5 version 28 subversion 1) configuration:
   
  Platform:
    osname=linux
    osvers=4.9.0-8-amd64
    archname=x86_64-linux_debian-9-thread-multi
    uname='linux macabre 4.9.0-8-amd64 #1 smp debian 4.9.110-3+deb9u5 (2018-09-30) x86_64 gnulinux '
    config_args='-de -Dprefix=/proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9 -Uinstallusrbinperl -Dperladmin=none -Dlocincpth=/proj/axaf/ots/include -Darchname=x86_64-linux_debian-9 -Dusethreads -Dotherlibdirs=/proj/axaf/simul/lib/perl5:/proj/axaf/simul/x86_64-linux_debian-9/lib/perl5 -Dloclibpth=/proj/axaf/ots/x86_64-linux_debian-9/lib -Dglibpth=/lib /usr/lib -Dldflags=-L/proj/axaf/ots/x86_64-linux_debian-9/lib -Wl,-rpath=/proj/axaf/ots/x86_64-linux_debian-9/lib -Duseshrplib'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/proj/axaf/ots/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
    optimize='-O2'
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/proj/axaf/ots/include'
    ccversion=''
    gccversion='6.3.0 20170516'
    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 ='-L/proj/axaf/ots/x86_64-linux_debian-9/lib -Wl,-rpath=/proj/axaf/ots/x86_64-linux_debian-9/lib -fstack-protector-strong'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /proj/axaf/ots/x86_64-linux_debian-9/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lpthread -lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.24.so
    so=so
    useshrplib=true
    libperl=libperl.so
    gnulibc_version='2.24'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E -Wl,-rpath,/proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9/lib/5.28.1/x86_64-linux_debian-9-thread-multi/CORE'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/proj/axaf/ots/x86_64-linux_debian-9/lib -fstack-protector-strong'



@INC for perl 5.28.1:
    /proj/axaf/simul/lib/perl5/x86_64-linux_debian-9-thread-multi
    /proj/axaf/simul/lib/perl5
    /home/dj/research/lib/perl5
    /proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9/lib/site_perl/5.28.1/x86_64-linux_debian-9-thread-multi
    /proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9/lib/site_perl/5.28.1
    /proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9/lib/5.28.1/x86_64-linux_debian-9-thread-multi
    /proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9/lib/5.28.1
    /proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9/lib/site_perl/5.28.0/x86_64-linux_debian-9-thread-multi
    /proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9/lib/site_perl/5.28.0
    /proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9/lib/site_perl
    /proj/axaf/simul/lib/perl5/x86_64-linux_debian-9-thread-multi
    /proj/axaf/simul/lib/perl5
    /proj/axaf/simul/x86_64-linux_debian-9/lib/perl5


Environment for perl 5.28.1:
    HOME=/home/dj
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/soft/SYBASE15.7/DataAccess64/ODBC/lib:/soft/SYBASE15.7/DataAccess/ODBC/lib:/soft/SYBASE15.7/OCS-15_0/lib:/soft/SYBASE15.7/OCS-15_0/lib3p64:/soft/SYBASE15.7/OCS-15_0/lib3p:
    LOGDIR (unset)
    PATH=/home/dj/.plenv/libexec:/home/dj/.plenv/plugins/link-axaf/bin:/home/dj/.plenv/plugins/perl-build/bin:/home/dj/.plenv/plugins/plenv-contrib/bin:/soft/SYBASE15.7/OCS-15_0/bin:/home/dj/.rbenv/shims:/home/dj/.rbenv/bin:/home/dj/.pyenv/plugins/pyenv-virtualenv/shims:/home/dj/.pyenv/shims:/home/dj/.pyenv/bin:/home/dj/.plenv/shims:/home/dj/.plenv/bin:/home/dj/root/bin:/home/dj/root/bin/hosts:/home/dj/research/bin:/proj/axaf/ots/pkgs/perl-5.28/x86_64-linux_debian-9/bin:/proj/axaf/bin:/proj/axaf/simul/bin:/proj/axaf/simul/x86_64-linux_debian-9/bin:/proj/axaf/ots/x86_64-linux_debian-9/bin:/proj/axaf/ots/bin:/usr/local/bin:/usr/sbin:/bin:/usr/bin:/soft/saord/bin
    PERL5LIB=/proj/axaf/simul/lib/perl5:/home/dj/research/lib/perl5
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 3, 2019

From @mfontani

On Thu, 03 Jan 2019 09​:15​:54 -0800, djerius wrote​:

The documentation for the ref() function indicates that it
returns 'REGEXP' for regular expressions. Actually,
it returns 'Regexp'​:
% perl -le 'print ref( qr// )'
Regexp
As far as I can recall (and verified with Perl 5.8.8) it has
always retrned 'Regexp'.

See attached patch, which also references the commit
where the change from Regexp to REGEXP was done.

Hope this helps,
-marco-

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 3, 2019

From @mfontani

0001-fix-perldoc-f-ref-return-value-for-Regexp.patch
From a9acc5184fbee966b58dc71084360bfdfafc1bff Mon Sep 17 00:00:00 2001
From: Marco Fontani <MFONTANI@cpan.org>
Date: Thu, 3 Jan 2019 18:24:59 +0100
Subject: [PATCH] fix "perldoc -f ref" return value for Regexp

... which was (mistakenly?) switched from Regexp to REGEXP in commit
f3c710fe342032112ac92fc893f5ef050b4f7024

For RT #133751
---
 pod/perlfunc.pod | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 664e2a3e0c..a6273bf183 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -6378,7 +6378,7 @@ a scalar, then the return value will be one of the strings C<ARRAY>,
 C<HASH>, C<CODE>, C<FORMAT>, or C<IO>, indicating only which kind of
 object it is.  If the unblessed referent is a scalar, then the return
 value will be one of the strings C<SCALAR>, C<VSTRING>, C<REF>, C<GLOB>,
-C<LVALUE>, or C<REGEXP>, depending on the kind of value the scalar
+C<LVALUE>, or C<Regexp>, depending on the kind of value the scalar
 currently has.  Beware that these built-in type names can also be used as
 class names, so C<ref> returning one of these names doesn't unambiguously
 indicate that the referent is of the kind to which the name refers.
-- 
2.20.1

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 3, 2019

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

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 3, 2019

From @jkeenan

On Thu, 03 Jan 2019 17​:15​:54 GMT, djerius wrote​:

This is a bug report for perl from djerius@​cpan.org,
generated with the help of perlbug 1.41 running under perl 5.28.1.

-----------------------------------------------------------------
[Please describe your issue here]

The documentation for the ref() function indicates that it
returns 'REGEXP' for regular expressions. Actually,
it returns 'Regexp'​:

% perl -le 'print ref( qr// )'
Regexp

As far as I can recall (and verified with Perl 5.8.8) it has
always returned 'Regexp'.

Yes. It appears that it's Scalar​::Util​::reftype() which returns the all-upper-case string.

#####
$ perl -MScalar​::Util=reftype -le 'print reftype( qr// )'
REGEXP
#####

List​: How should we handle this? (Simplest might be to just change the documentation in pod/perlfunc.pod around line 6381.)

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 3, 2019

From gm@qwurx.de

From the keyboard of James E Keenan via RT [03.01.19,09​:36]​:

On Thu, 03 Jan 2019 17​:15​:54 GMT, djerius wrote​:

This is a bug report for perl from djerius@​cpan.org,
generated with the help of perlbug 1.41 running under perl 5.28.1.

-----------------------------------------------------------------
[Please describe your issue here]

The documentation for the ref() function indicates that it
returns 'REGEXP' for regular expressions. Actually,
it returns 'Regexp'​:

% perl -le 'print ref( qr// )'
Regexp

As far as I can recall (and verified with Perl 5.8.8) it has
always returned 'Regexp'.

Yes. It appears that it's Scalar​::Util​::reftype() which returns the all-upper-case string.

#####
$ perl -MScalar​::Util=reftype -le 'print reftype( qr// )'
REGEXP
#####

List​: How should we handle this? (Simplest might be to just change the documentation in pod/perlfunc.pod around line 6381.)

I think it should return REGEXP, since that is consistent with the
uppercase return value for other references (HASH, ARRAY, CODE).

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=133751

0--gg-

--
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
  /\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 3, 2019

From @Leont

On Thu, Jan 3, 2019 at 9​:37 PM shmem <gm@​qwurx.de> wrote​:

List​: How should we handle this? (Simplest might be to just change the documentation in pod/perlfunc.pod around line 6381.)

I think it should return REGEXP, since that is consistent with the
uppercase return value for other references (HASH, ARRAY, CODE).

Unlike the examples you mention, a regexp is a blessed reference,
allowing you to call methods on them (even if by default none are
defined).

perl -E 'sub Regexp​::foo { say "HERE" }; qr//->foo

Leon

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 3, 2019

From gm@qwurx.de

From the keyboard of Leon Timmermans [03.01.19,22​:18]​:

On Thu, Jan 3, 2019 at 9​:37 PM shmem <gm@​qwurx.de> wrote​:

List​: How should we handle this? (Simplest might be to just change the documentation in pod/perlfunc.pod around line 6381.)

I think it should return REGEXP, since that is consistent with the
uppercase return value for other references (HASH, ARRAY, CODE).

Ah, ok. Then probably Regexp is right, since it is, hm, a package name
and not the type designator after '=' as in Foo=HASH(0xdabba00).

Unlike the examples you mention, a regexp is a blessed reference,
allowing you to call methods on them (even if by default none are
defined).

Well, DESTROY is defined, although it doesn't do anything ;) </nitpick>

perl -E 'sub Regexp​::foo { say "HERE" }; qr//->foo

Leon

0--gg-

--
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
  /\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 3, 2019

From @iabyn

On Thu, Jan 03, 2019 at 10​:39​:51PM +0100, shmem wrote​:

From the keyboard of Leon Timmermans [03.01.19,22​:18]​:
Ah, ok. Then probably Regexp is right, since it is, hm, a package name
and not the type designator after '=' as in Foo=HASH(0xdabba00).

I think the docs should say (as before)​:

  If the unblessed referent is a scalar, then the return
  value will be one of the strings C<SCALAR>, C<VSTRING>, C<REF>, C<GLOB>,
  C<LVALUE>, or C<REGEXP>, depending on the kind of value the scalar
  currently has.

But append​:

  But note that C<qr//> scalars are created already blessed, so
  C<ref qr/.../> will likely return C<Regexp>.

--
Please note that ash-trays are provided for the use of smokers,
whereas the floor is provided for the use of all patrons.
  -- Bill Royston

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 4, 2019

From Eirik-Berg.Hanssen@allverden.no

On Fri, Jan 4, 2019 at 12​:47 AM Dave Mitchell <davem@​iabyn.com> wrote​:

On Thu, Jan 03, 2019 at 10​:39​:51PM +0100, shmem wrote​:

From the keyboard of Leon Timmermans [03.01.19,22​:18]​:
Ah, ok. Then probably Regexp is right, since it is, hm, a package name
and not the type designator after '=' as in Foo=HASH(0xdabba00).

  Ah, indeed​:

$ perl -E 'use overload; say overload​::StrVal(qr//)'
Regexp=REGEXP(0x56229eba53f8)
$

I think the docs should say (as before)​:

If the unblessed referent is a scalar\, then the return
value will be one of the strings C\<SCALAR>\, C\<VSTRING>\, C\<REF>\,

C<GLOB>,
C<LVALUE>, or C<REGEXP>, depending on the kind of value the scalar
currently has.

But append​:

But note that C\<qr//> scalars are created already blessed\, so
C\<ref qr/\.\.\./> will likely return C\<Regexp>\.

  A good note, if you ask me.

Eirik

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 4, 2019

From @cpansprout

On Thu, 03 Jan 2019 15​:46​:45 -0800, davem wrote​:

On Thu, Jan 03, 2019 at 10​:39​:51PM +0100, shmem wrote​:

From the keyboard of Leon Timmermans [03.01.19,22​:18]​:
Ah, ok. Then probably Regexp is right, since it is, hm, a package name
and not the type designator after '=' as in Foo=HASH(0xdabba00).

I think the docs should say (as before)​:

If the unblessed referent is a scalar\, then the return
value will be one of the strings C\<SCALAR>\, C\<VSTRING>\, C\<REF>\, C\<GLOB>\,
C\<LVALUE>\, or C\<REGEXP>\, depending on the kind of value the scalar
currently has\.

But append​:

But note that C\<qr//> scalars are created already blessed\, so
C\<ref qr/\.\.\./> will likely return C\<Regexp>\.

Interesting​:

$ perl -le '$x = qr//; $y = $$x; print ref \$y'
REGEXP

I did not realize you could get that with pure Perl.

--

Father Chrysostomos

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 4, 2019

From @demerphq

On Fri, 4 Jan 2019 at 00​:46, Dave Mitchell <davem@​iabyn.com> wrote​:

On Thu, Jan 03, 2019 at 10​:39​:51PM +0100, shmem wrote​:

From the keyboard of Leon Timmermans [03.01.19,22​:18]​:
Ah, ok. Then probably Regexp is right, since it is, hm, a package name
and not the type designator after '=' as in Foo=HASH(0xdabba00).

FWIW, this is a historical issue. Way back in time before Nicholas
Clark converted qr// objects to first class types they were blessed
SCALAR references. The blessing I believe was to distinguish them from
normal SCALAR refs. When we introduced the REGEXP type

I think the docs should say (as before)​:

If the unblessed referent is a scalar\, then the return
value will be one of the strings C\<SCALAR>\, C\<VSTRING>\, C\<REF>\, C\<GLOB>\,
C\<LVALUE>\, or C\<REGEXP>\, depending on the kind of value the scalar
currently has\.

But append​:

But note that C\<qr//> scalars are created already blessed\, so
C\<ref qr/\.\.\./> will likely return C\<Regexp>\.

Would it be worth mentioning Scalar​::Util​::reftype() here as well?

Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 5, 2019

From @xsawyerx

On 1/4/19 6​:04 PM, demerphq wrote​:

On Fri, 4 Jan 2019 at 00​:46, Dave Mitchell <davem@​iabyn.com> wrote​:

On Thu, Jan 03, 2019 at 10​:39​:51PM +0100, shmem wrote​:

From the keyboard of Leon Timmermans [03.01.19,22​:18]​:
Ah, ok. Then probably Regexp is right, since it is, hm, a package name
and not the type designator after '=' as in Foo=HASH(0xdabba00).
FWIW, this is a historical issue. Way back in time before Nicholas
Clark converted qr// objects to first class types they were blessed
SCALAR references. The blessing I believe was to distinguish them from
normal SCALAR refs. When we introduced the REGEXP type

I think the docs should say (as before)​:

If the unblessed referent is a scalar\, then the return
value will be one of the strings C\<SCALAR>\, C\<VSTRING>\, C\<REF>\, C\<GLOB>\,
C\<LVALUE>\, or C\<REGEXP>\, depending on the kind of value the scalar
currently has\.

But append​:

But note that C\<qr//> scalars are created already blessed\, so
C\<ref qr/\.\.\./> will likely return C\<Regexp>\.

+1

Would it be worth mentioning Scalar​::Util​::reftype() here as well?

+1

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 15, 2019

From @tonycoz

On Sat, 05 Jan 2019 13​:46​:31 -0800, xsawyerx@​gmail.com wrote​:

On 1/4/19 6​:04 PM, demerphq wrote​:

On Fri, 4 Jan 2019 at 00​:46, Dave Mitchell <davem@​iabyn.com> wrote​:

I think the docs should say (as before)​:

If the unblessed referent is a scalar, then the return
value will be one of the strings C<SCALAR>, C<VSTRING>, C<REF>,
C<GLOB>,
C<LVALUE>, or C<REGEXP>, depending on the kind of value the scalar
currently has.

But append​:

But note that C<qr//> scalars are created already blessed, so
C<ref qr/.../> will likely return C<Regexp>.

+1

See the attached patch.

Would it be worth mentioning Scalar​::Util​::reftype() here as well?

+1

Immediately following this paragraph​:

The ambiguity between built-in type names and class names significantly
limits the utility of C<ref>. For unambiguous information, use
L<C<Scalar​::Util​::blessed()>|Scalar​::Util/blessed> for information about
blessing, and L<C<Scalar​::Util​::reftype()>|Scalar​::Util/reftype> for
information about physical types. Use L<the C<isa> method|UNIVERSAL/C<<
$obj->isa( TYPE ) >>> for class membership tests, though one must be
sure of blessedness before attempting a method call.

I don't think it needs another mention.

Tony

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 15, 2019

From @tonycoz

0001-perl-133751-qr-is-already-blessed.patch
From 818ed1fc594998f6295c8bf03ccc5c7c8e27592a Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 16 Jan 2019 09:42:16 +1100
Subject: (perl #133751) qr// is already blessed

---
 pod/perlfunc.pod | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 7c37a0e775..973a2612d7 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -6379,7 +6379,9 @@ C<HASH>, C<CODE>, C<FORMAT>, or C<IO>, indicating only which kind of
 object it is.  If the unblessed referent is a scalar, then the return
 value will be one of the strings C<SCALAR>, C<VSTRING>, C<REF>, C<GLOB>,
 C<LVALUE>, or C<REGEXP>, depending on the kind of value the scalar
-currently has.  Beware that these built-in type names can also be used as
+currently has.   But note that C<qr//> scalars are created already
+blessed, so C<ref qr/.../> will likely return C<Regexp>.  Beware that
+these built-in type names can also be used as
 class names, so C<ref> returning one of these names doesn't unambiguously
 indicate that the referent is of the kind to which the name refers.
 
-- 
2.11.0

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 22, 2019

From @tonycoz

On Tue, 15 Jan 2019 14​:45​:47 -0800, tonyc wrote​:

On Sat, 05 Jan 2019 13​:46​:31 -0800, xsawyerx@​gmail.com wrote​:

On 1/4/19 6​:04 PM, demerphq wrote​:

On Fri, 4 Jan 2019 at 00​:46, Dave Mitchell <davem@​iabyn.com> wrote​:

I think the docs should say (as before)​:

If the unblessed referent is a scalar, then the return
value will be one of the strings C<SCALAR>, C<VSTRING>, C<REF>,
C<GLOB>,
C<LVALUE>, or C<REGEXP>, depending on the kind of value the scalar
currently has.

But append​:

But note that C<qr//> scalars are created already blessed, so
C<ref qr/.../> will likely return C<Regexp>.

+1

See the attached patch.

Applied as 4829a1e.

Tony

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jan 22, 2019

@tonycoz - Status changed from 'open' to 'pending release'

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 22, 2019

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release today of Perl 5.30.0, this and 160 other issues have been
resolved.

Perl 5.30.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.30.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 22, 2019

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.