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

Documentation -- description of qr// #2685

p5pRT opened this issue Oct 5, 2000 · 2 comments

Documentation -- description of qr// #2685

p5pRT opened this issue Oct 5, 2000 · 2 comments


Copy link

@p5pRT p5pRT commented Oct 5, 2000

Migrated from (status was 'resolved')

Searchable as RT4387$

Copy link

@p5pRT p5pRT commented Oct 5, 2000


Created by mgjv@martien.heliotrope.home

This is a bug report for perl from mgjv@​martien.heliotrope.home,
generated with the help of perlbug 1.28 running under perl v5.6.0.

After discussion with several people (specifically including Ilya
Zakharevich) on comp.lang.perl.moderated, it is now my opinion that
there is some misinformation in the documentation on qr//. There
certainly is contradiction. While this is not problematic for the
correct behaviour of perl, it is confusing, and may lead people to
choose to use qr// for the wrong reasons.

The documentation states that

This operators quotes--and compiles--its I<STRING> as a regular

Ilya is certain that, while in the current implementation the phrase
'--and compiles--' is correct, this is not the intention of the qr//
operator, and neither is it planned to always keep this as part of the
specification of qr//. A later excerpt of said documentation supports
his view on that​:

Since Perl may compile the pattern at the moment of execution of qr()
operator, using qr() may have speed advantages in some situations,
notably if the result of qr() is used standalone​:

Note the use of the word 'may' in that sentence.

Rather than allowing this contradiction in the documentation to
persist, I suggest that the first sentence be changed to

This operators quotes (and possibly compiles) its I<STRING> as a
regular expression.

If the intention of the qr// operator has changed, and it will indeed
always and forever compile the string immediately as a RE, in the later
paragraph 'may compile' should be changed to 'compiles'.

Martien Verbruggen

Perl Info


Site configuration information for perl v5.6.0:

Configured by mgjv at Sat Mar 25 17:48:49 EST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
    osname=linux, osvers=2.2.12-20, archname=i686-linux
    uname='linux martien 2.2.12-20 #1 mon sep 27 10:40:35 edt 1999 i686 unknown '
    config_args='-des -Dprefix=/opt/perl'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.6.0:

Environment for perl v5.6.0:
    LANGUAGE (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Copy link

@p5pRT p5pRT commented Nov 29, 2000

From @jhi

persist, I suggest that the first sentence be changed to

This operators quotes (and possibly compiles) its I<STRING> as a
regular expression.

Applied, thanks.

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

Successfully merging a pull request may close this issue.

None yet
1 participant