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

[ID 20010811.011] Gory details of parsing quoted constructs

From:
Abigail
Date:
August 11, 2001 18:19
Subject:
[ID 20010811.011] Gory details of parsing quoted constructs
Message ID:
20010812011800.23919.qmail@foad.org
This is a bug report for perl from abigail@foad.org,
generated with the help of perlbug 1.33 running under perl v5.6.1.


-----------------------------------------------------------------
[Please enter your report here]

perlop.pod says:

                                                       Because C</> is
    equivalent to C<\/> inside a regular expression, this does not
    matter unless the delimiter happens to be character special to the
    RE engine, such as in C<s*foo*bar*>, C<m[foo]>, or C<?foo?>; or an
    alphanumeric char, as in:

      m m ^ a \s* b mmx; 

    In the RE above, which is intentionally obfuscated for illustration, the
    delimiter is C<m>, the modifier is C<mx>, and after backslash-removal the
    RE is the same as for C<m/ ^ a s* b /mx>).  There's more than one
    reason you're encouraged to restrict your delimiters to non-alphanumeric,
    non-whitespace choices.


Something is wrong here, but I am not sure what. It seems to claim
that C<m m ^ a \s* b mmx> is equivalent to C<m/ ^ a s* b /mx>, but
that isn't true. Testing shows C<m m ^ a \s* b mmx> to be equivalent to
C<m/ ^ a \s* b /mx>.

But if the documentation contains a simple typo, what is the point being
made? 


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=docs
    severity=low
---
Site configuration information for perl v5.6.1:

Configured by abigail at Fri Apr 13 19:51:50 MEST 2001.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.2.13, archname=i686-linux-64int-ld
    uname='linux alexandra 2.2.13 #5 tue feb 8 15:37:54 est 2000 i686 unknown '
    config_args='-Dprefix=/opt/perl -des -Uinstallusrbinperl -Doptimize=-g -Dusemorebits -Dcf_email=abigail@foad.org -Dperladmin=abigail@foad.org'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=define
  Compiler:
    cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, 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 -ldbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
    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.1:
    /home/abigail/Perl
    /home/abigail/Sybase
    /opt/perl/lib/5.6.1/i686-linux-64int-ld
    /opt/perl/lib/5.6.1
    /opt/perl/lib/site_perl/5.6.1/i686-linux-64int-ld
    /opt/perl/lib/site_perl/5.6.1
    /opt/perl/lib/site_perl/5.6.0
    /opt/perl/lib/site_perl/5.005
    /opt/perl/lib/site_perl
    .

---
Environment for perl v5.6.1:
    HOME=/home/abigail
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/home/abigail/Lib:/usr/local/lib:/usr/lib:/lib:/usr/X11R6/lib:/opt/tcl/lib:/opt/tk/lib/tk8.0
    LOGDIR (unset)
    PATH=/home/abigail/Bin:/opt/perl/bin:/opt/tcl/bin:/opt/tk/bin:/usr/local/bin:/usr/local/X11/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/games:/opt/povray/bin:/opt/teTeX/bin/i686-pc-linux-gnu:/opt/python/bin:/opt/acrobat/bin
    PERL5LIB=/home/abigail/Perl:/home/abigail/Sybase
    PERLDIR=/opt/perl
    PERL_BADLANG (unset)
    SHELL=/bin/bash




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About