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

Closed
p5pRT opened this issue Oct 5, 2000 · 2 comments
Closed

Documentation -- description of qr// #2685

p5pRT opened this issue Oct 5, 2000 · 2 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Oct 5, 2000

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

Searchable as RT4387$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 5, 2000

From mgjv@comdyn.com.au

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
expression.

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

Flags:
    category=docs
    severity=low

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:
  Platform:
    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
  Compiler:
    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/libc-2.1.2.so, 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:
    /opt/perl/lib/5.6.0/i686-linux
    /opt/perl/lib/5.6.0
    /opt/perl/lib/site_perl/5.6.0/i686-linux
    /opt/perl/lib/site_perl/5.6.0
    /opt/perl/lib/site_perl/5.005/i686-linux
    /opt/perl/lib/site_perl/5.005
    /opt/perl/lib/site_perl
    .


Environment for perl v5.6.0:
    HOME=/home/mgjv
    LANG=en_US
    LANGUAGE (unset)
    LC_ALL=en_US
    LD_LIBRARY_PATH=/opt/pgplot:/opt/pgplot
    LOGDIR (unset)
    PATH=/home/mgjv/bin:/opt/teTeX/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/opt/perl/bin:/opt/samba/bin:/opt/wine/bin:/usr/sybase/bin:/usr/local/jdk1.2/bin:/opt/Adobe/fm/bin:/opt/schily/bin
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh


@p5pRT
Copy link
Author

@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant