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

Bug in Switch module #7812

Closed
p5pRT opened this issue Feb 23, 2005 · 24 comments
Closed

Bug in Switch module #7812

p5pRT opened this issue Feb 23, 2005 · 24 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 23, 2005

Migrated from rt.perl.org#34233 (status was 'rejected')

Searchable as RT34233$

@p5pRT
Copy link
Author

p5pRT commented Feb 23, 2005

From internationils@gmx.net

Attached is the bugreport and code to reproduce it. If there are
questions, please drop me a line.

Thanks,
Nils.

@p5pRT
Copy link
Author

p5pRT commented Feb 23, 2005

From internationils@gmx.net

test.csv

@p5pRT
Copy link
Author

p5pRT commented Feb 23, 2005

From internationils@gmx.net

demo.pl

@p5pRT
Copy link
Author

p5pRT commented Feb 23, 2005

From internationils@gmx.net

Created by internationils@gmx.net

using Perl, running under Cygwin on Win XP SP2

including "use Switch;" in the program breaks the program, even if it is not used. Adding or removing comments or random lines of code (whether actually called or not) can cause or remove the program.

To reproduce​:
- save data as test.csv
- save program as prog.pl
- run as prog.pl > output
- there are additional spaces behind "timeframe" instead of one. This breaks a longer version of the proram, this was the easiest way to reproduce the problem.

Switch should be fixed or removed from Core. It is a serious liability.

Thanks,
  Nils.

Perl Info

Flags:
    category=core
    severity=critical

Site configuration information for perl v5.8.6:

Configured by gerrit at Thu Jan 27 11:04:16 EST 2005.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=cygwin, osvers=1.5.12(0.11642), archname=cygwin-thread-multi-64int
    uname='cygwin_nt-4.0 loreley 1.5.12(0.11642) 2004-11-10 08:34 i686 unknown unknown cygwin '
    config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Doptimize=-O3 -Dman3ext=3pm'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=y, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include',
    optimize='-O3',
    cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='3.4.1 (cygming special)', 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='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ld2', ldflags =' -s -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib
    libs=-lgdbm -ldb -lcrypt -lgdbm_compat
    perllibs=-lcrypt -lgdbm_compat
    libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
    cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.6:
    /usr/lib/perl5/5.8/cygwin
    /usr/lib/perl5/5.8
    /usr/lib/perl5/site_perl/5.8/cygwin
    /usr/lib/perl5/site_perl/5.8
    /usr/lib/perl5/site_perl/5.8
    /usr/lib/perl5/vendor_perl/5.8/cygwin
    /usr/lib/perl5/vendor_perl/5.8
    /usr/lib/perl5/vendor_perl/5.8
    .


Environment for perl v5.8.6:
    HOME=/cygdrive/c/Dokumente und Einstellungen/nbo.LOCANIS
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/oracle/ora92/bin:/cygdrive/c/Programme/Oracle/jre/1.3.1/bin:/cygdrive/c/Programme/Oracle/jre/1.1.8/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/DOWNLO~1/ftp/ncftp/bin
    PERL_BADLANG (unset)
    SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Feb 24, 2005

From @ysth

On Wed, Feb 23, 2005 at 01​:14​:01PM -0000, Nils wrote​:

including "use Switch;" in the program breaks the program, even if
it is not used. Adding or removing comments or random lines of code
(whether actually called or not) can cause or remove the program.

Switch should be fixed or removed from Core. It is a serious liability.

Umm, since removing it would also break programs that say "use Switch;",
I don't see the benefit (nor would it help existing perl versions).
So I'd vote for having it be fixed.

@p5pRT
Copy link
Author

p5pRT commented Feb 24, 2005

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

@p5pRT
Copy link
Author

p5pRT commented Feb 24, 2005

From @nwc10

On Wed, Feb 23, 2005 at 11​:52​:12PM -0800, Yitzchak Scott-Thoennes wrote​:

On Wed, Feb 23, 2005 at 01​:14​:01PM -0000, Nils wrote​:

Switch should be fixed or removed from Core. It is a serious liability.

Umm, since removing it would also break programs that say "use Switch;",
I don't see the benefit (nor would it help existing perl versions).
So I'd vote for having it be fixed.

It would be good if someone who understands it were able to do this.

[Prerequisites on this task being either understanding and time, or just
a lot of time]

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Feb 24, 2005

From @ysth

On Thu, Feb 24, 2005 at 09​:40​:15AM +0000, Nicholas Clark wrote​:

On Wed, Feb 23, 2005 at 11​:52​:12PM -0800, Yitzchak Scott-Thoennes wrote​:

On Wed, Feb 23, 2005 at 01​:14​:01PM -0000, Nils wrote​:

Switch should be fixed or removed from Core. It is a serious liability.

Umm, since removing it would also break programs that say "use Switch;",
I don't see the benefit (nor would it help existing perl versions).
So I'd vote for having it be fixed.

It would be good if someone who understands it were able to do this.

I actually meant something more like "I'd vote for leaving it in until
it gets fixed, howsoever long that be."

[Prerequisites on this task being either understanding and time, or just
a lot of time]

I would fall into the requiring "a lot of time" category.

@p5pRT
Copy link
Author

p5pRT commented Feb 24, 2005

From @rgs

Nicholas Clark wrote​:

On Wed, Feb 23, 2005 at 11​:52​:12PM -0800, Yitzchak Scott-Thoennes wrote​:

On Wed, Feb 23, 2005 at 01​:14​:01PM -0000, Nils wrote​:

Switch should be fixed or removed from Core. It is a serious liability.

Umm, since removing it would also break programs that say "use Switch;",
I don't see the benefit (nor would it help existing perl versions).
So I'd vote for having it be fixed.

It would be good if someone who understands it were able to do this.

As the official Switch maintainer, I have to say that I'm not very confident
in making the black magic that makes source filter based modules work reliably
in all cases.

@p5pRT
Copy link
Author

p5pRT commented Feb 24, 2005

From @Tux

On Thu, 24 Feb 2005 01​:49​:22 -0800, Yitzchak Scott-Thoennes <sthoenna@​efn.org>
wrote​:

On Thu, Feb 24, 2005 at 09​:40​:15AM +0000, Nicholas Clark wrote​:

On Wed, Feb 23, 2005 at 11​:52​:12PM -0800, Yitzchak Scott-Thoennes wrote​:

On Wed, Feb 23, 2005 at 01​:14​:01PM -0000, Nils wrote​:

Switch should be fixed or removed from Core. It is a serious
liability.

Umm, since removing it would also break programs that say "use Switch;",
I don't see the benefit (nor would it help existing perl versions).
So I'd vote for having it be fixed.

It would be good if someone who understands it were able to do this.

I actually meant something more like "I'd vote for leaving it in until
it gets fixed, howsoever long that be."

:)

FWIW I have far encountered too many problems with Switch, esp in combination
with dor, to be daring enough to rely on it. I just don't use it anymore.

[Prerequisites on this task being either understanding and time, or just
a lot of time]

I would fall into the requiring "a lot of time" category.

And I think that next to "time" and "understanding", one certainly needs
"motivation", something completely absent on this side of the keyboard for
that module.

--
H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/)
using Perl 5.6.2, 5.8.0, 5.8.3, & 5.9.2 on HP-UX 10.20, 11.00 & 11.11,
  AIX 4.3, SuSE 9.0 pro 2.4.21 & Win2k. http​://www.cmve.net/~merijn
Smoking perl​: smokers@​perl.org, perl QA​: http​://qa.perl.org
  reports to​: smokers-reports@​perl.org, perl-qa@​perl.org

@p5pRT
Copy link
Author

p5pRT commented Feb 24, 2005

From @ysth

On Thu, Feb 24, 2005 at 11​:51​:23AM +0100, H.Merijn Brand wrote​:

FWIW I have far encountered too many problems with Switch, esp in combination
with dor, to be daring enough to rely on it. I just don't use it anymore.

[Prerequisites on this task being either understanding and time, or just
a lot of time]

I would fall into the requiring "a lot of time" category.

And I think that next to "time" and "understanding", one certainly needs
"motivation", something completely absent on this side of the keyboard for
that module.

If it's the source filter aspect that deters you, note that perltodo says​:

=head2 switch ops

The old perltodo notes "Although we have C<Switch.pm> in core, Larry points to
the dormant C<nswitch> and C<cswitch> ops in F<pp.c>; using these opcodes would
be much faster."

@p5pRT
Copy link
Author

p5pRT commented Feb 24, 2005

From @tamias

Here is a simple script that demonstrates the bug​:

#!/usr/bin/perl -w

use strict;

use Switch;

# case (make sure Switch.pm applies the filter)

my $x = 4;
my $y = $x/2;
my $filename = "dir/tmp.txt";

print "Look for extra whitespace here --> $filename\n";

__END__

The problem is that the first / is being matched as the start of a regular
expression, rather than as the division operator. The second " is then
matched as the start of a string, rather than the end. This results in the
rest of the code being filtered as if the strings were code and the code
were strings.

Here's the filtered code, with !V{}V! and !Q{}Q! showing the matching of
variables and quote-like strings, respectively.

# line 6

# case (make sure Switch.pm applies the filter)

my!V{ $x}V! = 4;
my!V{ $y}V! = 4!Q{/$x;
my $filename = "dir/}Q!tmp.txt!Q{";

print "}Q!Look for extra whitespace here -->!V{ $filename}V!\n";

The extra whitespace appears as the result of a second bug, which adds an
unnecessary space character to the whitespace that is already there.
Although fixing this would solve the original poster's problem, the module
would still be broken.

The matching of / as the start of a quote-like string happens in
Text​::Balanced​::_match_quotelike(). Unfortunately, I don't think there's a
simple fix.

This seems to be the fatal flaw of any simplistic attempt at parsing Perl;
it can't be done without keeping track at all times whether a term or an
operator is expected.

Ronald

@p5pRT
Copy link
Author

p5pRT commented Feb 24, 2005

From david@landgren.net

Yitzchak Scott-Thoennes wrote​:

Switch should be fixed or removed from Core. It is a serious liability.

Umm, since removing it would also break programs that say "use Switch;",

Odd. I tend to find the reverse. Adding "use Switch;" to a program tends
to break it.

No, I'm not trying to troll. Seriously, do people use Switch.pm in a
production environment? Last time I took it for a spin, it produced
syntax errors that jumped around every time I tried to put my finger on
them.

David

@p5pRT
Copy link
Author

p5pRT commented Jul 11, 2006

From artyomt@Insightec.com

This is a bug report for perl from artyomt@​insightec.com,
generated with the help of perlbug 1.35 running under perl v5.8.6.

Wrong syntax error.
Use of the '/' operator makes Switch modul to fail.

The script example (reduced version)​:
###############################
use Switch;

my $line;
if ($line =~ /^Frequency\s+=\s+(\d+)\./){
  $freq = $1/1000000;

}

#sub for opening files in 'read', 'write' or 'append' mode
sub openFile()
{
  my ($file, $mode) = @​_;
  local *FH;
  switch($mode){
  case 'r'{
  if(!open(FH , $file)){
  print"can't open $file $!";
  return 0;
  }
  }
  case 'w'{
  if(!open(FH , ">$file")){
  print"can't open $file $!";
  return 0;
  }
  }
  case 'a'{
  if(!open(FH , ">>$file")){
  print"can't open $file $!";
  return 0;
  }
  }
  else{
  print"wrong or unsupported mode​: use 'r' or
'w'";
  return 0;
  }
  }
  return *FH;

}

# sub simple_stats {
  # my $mean = $sum_x / $size;
# }

###END########

The error message​:

perl -c test.pl

String found where operator expected at test.pl line 14, near "case
'r'"
  (Do you need to predeclare case?)
syntax error at test.pl line 13, near "){"
syntax error at test.pl line 19, near "}"
test.pl had compilation errors.

Eny of the following eliminates the error​:
1. Removing or commenting :
  if ($line =~ /^Frequency\s+=\s+(\d+)\./){
  $freq = $1/1000000;
  }
2. Removing or commenting the openFile sub.
3. Removing the commented simple_stats sub !!! ---
Flags​:
  category=core
  severity=medium


Site configuration information for perl v5.8.6​:

Configured by ActiveState at Mon Dec 13 09​:51​:32 2004.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration​:
  Platform​:
  osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
  uname=''
  config_args='undef'
  hint=recommended, useposix=true, d_sigaction=undef
  usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=undef uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32
-D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-DPERL_MSVCRT_READFIX',
  optimize='-MD -Zi -DNDEBUG -O1',
  cppflags='-DWIN32'
  ccversion='', gccversion='', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='link', ldflags ='-nologo -nodefaultlib -debug -opt​:ref,icf
-libpath​:"C​:\TEMP\perl--------------------------------------------please
-run-the-install-script-------------------------------------------\lib\C
ORE" -machine​:x86'
  libpth=\lib
  libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib msvcrt.lib
  perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib msvcrt.lib
  libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
  gnulibc_version='undef'
  Dynamic Linking​:
  dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt​:ref,icf
-libpath​:"C​:\TEMP\perl--------------------------------------------please
-run-the-install-script-------------------------------------------\lib\C
ORE" -machine​:x86'

Locally applied patches​:
  ACTIVEPERL_LOCAL_PATCHES_ENTRY
  21540 Fix backward-compatibility issues in if.pm
  23565 Wrong MANIFEST.SKIP


@​INC for perl v5.8.6​:
  U​:/lib
  U​:/site/lib
  .


Environment for perl v5.8.6​:
  HOME=U​:\
  LANG (unset)
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)

PATH=U​:\bin\;C​:\WINDOWS\system32;C​:\WINDOWS;C​:\WINDOWS\System32\Wbem;C​:\
Program Files\WinZip;C​:\Program Files\Microsoft SQL
Server\80\Tools\Binn\;C​:\VXIPNP\WinNT\Bin;C​:\Program
Files\IVI\bin;D​:\Program Files\Rational\ClearCase\bin;D​:\Program
Files\Rational\common;D​:\perl2exe;D​:\PROGRA1\IBM\SQLLIB\BIN;D​:\PROGRA1
\IBM\SQLLIB\FUNCTION
  PERL_BADLANG (unset)
  SHELL=D​:\PROGRA1\RATIONAL\RATION1\NUTCROOT\mksnt\sh.exe

Complete configuration data for perl v5.8.6​:

Author=''
CONFIG='true'
Date='$Date'
Header=''
Id='$Id'
Locker=''
Log='$Log'
PATCHLEVEL='8'
PERL_API_REVISION='5'
PERL_API_SUBVERSION='0'
PERL_API_VERSION='8'
PERL_CONFIG_SH='true'
PERL_PATCHLEVEL='8'
PERL_REVISION='5'
PERL_SUBVERSION='6'
PERL_VERSION='8'
RCSfile='$RCSfile'
Revision='$Revision'
SUBVERSION='6'
Source=''
State=''
_a='.lib'
_exe='.exe'
_o='.obj'
afs='false'
afsroot='/afs'
alignbytes='8'
ansi2knr=''
aphostname=''
api_revision='5'
api_subversion='0'
api_version='8'
api_versionstring='5.8.0'
ar='lib'
archlib='U​:\lib'
archlibexp='C​:\TEMP\perl--------------------------------------------plea
se-run-the-install-script-------------------------------------------\lib
'
archname='MSWin32-x86-multi-thread'
archname64=''
archobjs=''
asctime_r_proto='0'
awk='awk'
baserev='5'
bash=''
bin='U​:\bin'
binexp='U​:\bin'
bison=''
byacc='byacc'
byteorder='1234'
c=''
castflags='0'
cat='type'
cc='cl'
cccdlflags=' '
ccdlflags=' '
ccflags='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE
-DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX'
ccflags_uselargefiles=''
ccname=''
ccsymbols=''
ccversion=''
cf_by='ActiveState'
cf_email='support@​ActiveState.com'
cf_time='Mon Dec 13 09​:51​:32 2004'
charsize='1'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm=''
compress=''
contains='grep'
cp='copy'
cpio=''
cpp='cl -nologo -E'
cpp_stuff='42'
cppccsymbols=''
cppflags='-DWIN32'
cpplast=''
cppminus=''
cpprun='cl -nologo -E'
cppstdin='cppstdin'
cppsymbols=''
crypt_r_proto='0'
cryptlib=''
csh=''
ctermid_r_proto='0'
ctime_r_proto='0'
d_Gconvert='sprintf((b),"%.*g",(n),(x))'
d_PRIEUldbl=''
d_PRIFUldbl=''
d_PRIGUldbl=''
d_PRIXU64=''
d_PRId64=''
d_PRIeldbl=''
d_PRIfldbl=''
d_PRIgldbl=''
d_PRIi64=''
d_PRIo64=''
d_PRIu64=''
d_PRIx64=''
d_SCNfldbl=''
d__fwalk=''
d_access='define'
d_accessx=''
d_aintl=''
d_alarm='define'
d_archlib='define'
d_asctime_r=''
d_atolf=''
d_atoll=''
d_attribut=''
d_bcmp=''
d_bcopy=''
d_bsd='define'
d_bsdgetpgrp=''
d_bsdsetpgrp=''
d_bzero=''
d_casti32=''
d_castneg='define'
d_charvspr=''
d_chown=''
d_chroot=''
d_chsize='define'
d_class=''
d_closedir='define'
d_cmsghdr_s=''
d_const='define'
d_copysignl=''
d_crypt='define'
d_crypt_r=''
d_csh=''
d_ctermid_r=''
d_ctime_r=''
d_cuserid=''
d_dbl_dig='define'
d_dbminitproto=''
d_difftime='define'
d_dirfd=''
d_dirnamlen='define'
d_dlerror='define'
d_dlopen='define'
d_dlsymun=''
d_dosuid=''
d_drand48_r=''
d_drand48proto=''
d_dup2='define'
d_eaccess=''
d_endgrent=''
d_endgrent_r=''
d_endhent=''
d_endhostent_r=''
d_endnent=''
d_endnetent_r=''
d_endpent=''
d_endprotoent_r=''
d_endpwent=''
d_endpwent_r=''
d_endsent=''
d_endservent_r=''
d_eofnblk='define'
d_eunice=''
d_faststdio='define'
d_fchdir=''
d_fchmod=''
d_fchown=''
d_fcntl=''
d_fcntl_can_lock=''
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
d_fgetpos='define'
d_finite=''
d_finitel=''
d_flexfnam='define'
d_flock='define'
d_flockproto='define'
d_fork=''
d_fp_class=''
d_fpathconf=''
d_fpclass=''
d_fpclassify=''
d_fpclassl=''
d_fpos64_t=''
d_frexpl=''
d_fs_data_s=''
d_fseeko=''
d_fsetpos='define'
d_fstatfs=''
d_fstatvfs=''
d_fsync=''
d_ftello=''
d_ftime='define'
d_getcwd='define'
d_getespwnam=''
d_getfsstat=''
d_getgrent=''
d_getgrent_r=''
d_getgrgid_r=''
d_getgrnam_r=''
d_getgrps=''
d_gethbyaddr='define'
d_gethbyname='define'
d_gethent=''
d_gethname='define'
d_gethostbyaddr_r=''
d_gethostbyname_r=''
d_gethostent_r=''
d_gethostprotos='define'
d_getitimer=''
d_getlogin='define'
d_getlogin_r=''
d_getmnt=''
d_getmntent=''
d_getnbyaddr=''
d_getnbyname=''
d_getnent=''
d_getnetbyaddr_r=''
d_getnetbyname_r=''
d_getnetent_r=''
d_getnetprotos=''
d_getpagsz=''
d_getpbyname='define'
d_getpbynumber='define'
d_getpent=''
d_getpgid=''
d_getpgrp=''
d_getpgrp2=''
d_getppid=''
d_getprior=''
d_getprotobyname_r=''
d_getprotobynumber_r=''
d_getprotoent_r=''
d_getprotoprotos='define'
d_getprpwnam=''
d_getpwent=''
d_getpwent_r=''
d_getpwnam_r=''
d_getpwuid_r=''
d_getsbyname='define'
d_getsbyport='define'
d_getsent=''
d_getservbyname_r=''
d_getservbyport_r=''
d_getservent_r=''
d_getservprotos='define'
d_getspnam=''
d_getspnam_r=''
d_gettimeod='define'
d_gmtime_r=''
d_gnulibc=''
d_grpasswd=''
d_hasmntopt=''
d_htonl='define'
d_ilogbl=''
d_index=''
d_inetaton=''
d_int64_t=''
d_isascii='define'
d_isfinite=''
d_isinf=''
d_isnan='define'
d_isnanl=''
d_killpg=''
d_lchown=''
d_ldbl_dig='define'
d_link='define'
d_localtime_r=''
d_locconv='define'
d_lockf=''
d_longdbl='define'
d_longlong=''
d_lseekproto='define'
d_lstat=''
d_madvise=''
d_mblen='define'
d_mbstowcs='define'
d_mbtowc='define'
d_memchr='define'
d_memcmp='define'
d_memcpy='define'
d_memmove='define'
d_memset='define'
d_mkdir='define'
d_mkdtemp=''
d_mkfifo=''
d_mkstemp=''
d_mkstemps=''
d_mktime='define'
d_mmap=''
d_modfl=''
d_modfl_pow32_bug=''
d_mprotect=''
d_msg=''
d_msg_ctrunc=''
d_msg_dontroute=''
d_msg_oob=''
d_msg_peek=''
d_msg_proxy=''
d_msgctl=''
d_msgget=''
d_msghdr_s=''
d_msgrcv=''
d_msgsnd=''
d_msync=''
d_munmap=''
d_mymalloc=''
d_nice=''
d_nl_langinfo=''
d_nv_preserves_uv='define'
d_off64_t=''
d_old_pthread_create_joinable=''
d_oldpthreads=''
d_oldsock=''
d_open3=''
d_pathconf=''
d_pause='define'
d_perl_otherlibdirs=''
d_phostname=''
d_pipe='define'
d_poll=''
d_portable='define'
d_procselfexe=''
d_pthread_atfork=''
d_pthread_attr_setscope=''
d_pthread_yield=''
d_pwage=''
d_pwchange=''
d_pwclass=''
d_pwcomment=''
d_pwexpire=''
d_pwgecos=''
d_pwpasswd=''
d_pwquota=''
d_qgcvt=''
d_quad=''
d_random_r=''
d_readdir='define'
d_readdir64_r=''
d_readdir_r=''
d_readlink=''
d_readv=''
d_recvmsg=''
d_rename='define'
d_rewinddir='define'
d_rmdir='define'
d_safebcpy=''
d_safemcpy=''
d_sanemcmp='define'
d_sbrkproto=''
d_scalbnl=''
d_sched_yield=''
d_scm_rights=''
d_seekdir='define'
d_select='define'
d_sem=''
d_semctl=''
d_semctl_semid_ds=''
d_semctl_semun=''
d_semget=''
d_semop=''
d_sendmsg=''
d_setegid=''
d_seteuid=''
d_setgrent=''
d_setgrent_r=''
d_setgrps=''
d_sethent=''
d_sethostent_r=''
d_setitimer=''
d_setlinebuf=''
d_setlocale='define'
d_setlocale_r=''
d_setnent=''
d_setnetent_r=''
d_setpent=''
d_setpgid=''
d_setpgrp=''
d_setpgrp2=''
d_setprior=''
d_setproctitle=''
d_setprotoent_r=''
d_setpwent=''
d_setpwent_r=''
d_setregid=''
d_setresgid=''
d_setresuid=''
d_setreuid=''
d_setrgid=''
d_setruid=''
d_setsent=''
d_setservent_r=''
d_setsid=''
d_setvbuf='define'
d_sfio=''
d_shm=''
d_shmat=''
d_shmatprototype=''
d_shmctl=''
d_shmdt=''
d_shmget=''
d_sigaction=''
d_sigprocmask=''
d_sigsetjmp=''
d_sockatmark=''
d_sockatmarkproto=''
d_socket='define'
d_socklen_t=''
d_sockpair=''
d_socks5_init=''
d_sqrtl=''
d_srand48_r=''
d_srandom_r=''
d_sresgproto=''
d_sresuproto=''
d_statblks=''
d_statfs_f_flags=''
d_statfs_s=''
d_statvfs=''
d_stdio_cnt_lval='define'
d_stdio_ptr_lval='define'
d_stdio_ptr_lval_nochange_cnt='define'
d_stdio_ptr_lval_sets_cnt=''
d_stdio_stream_array=''
d_stdiobase='define'
d_stdstdio='define'
d_strchr='define'
d_strcoll='define'
d_strctcpy='define'
d_strerrm='strerror(e)'
d_strerror='define'
d_strerror_r=''
d_strftime='define'
d_strtod='define'
d_strtol='define'
d_strtold=''
d_strtoll=''
d_strtoq=''
d_strtoul='define'
d_strtoull=''
d_strtouq=''
d_strxfrm='define'
d_suidsafe=''
d_symlink=''
d_syscall=''
d_syscallproto=''
d_sysconf=''
d_sysernlst=''
d_syserrlst='define'
d_system='define'
d_tcgetpgrp=''
d_tcsetpgrp=''
d_telldir='define'
d_telldirproto='define'
d_time='define'
d_times='define'
d_tm_tm_gmtoff=''
d_tm_tm_zone=''
d_tmpnam_r=''
d_truncate=''
d_ttyname_r=''
d_tzname='define'
d_u32align=''
d_ualarm=''
d_umask='define'
d_uname='define'
d_union_semun='define'
d_unordered=''
d_usleep=''
d_usleepproto=''
d_ustat=''
d_vendorarch=''
d_vendorbin=''
d_vendorlib=''
d_vfork=''
d_void_closedir=''
d_voidsig='define'
d_voidtty=''
d_volatile='define'
d_vprintf='define'
d_wait4=''
d_waitpid='define'
d_wcstombs='define'
d_wctomb='define'
d_writev=''
d_xenix=''
date='date'
db_hashtype='int'
db_prefixtype='int'
db_version_major='0'
db_version_minor='0'
db_version_patch='0'
defvoidused='15'
direntrytype='struct direct'
dlext='dll'
dlsrc='dl_win32.xs'
doublesize='8'
drand01='(rand()/(double)((unsigned)1<<RANDBITS))'
drand48_r_proto='0'
dynamic_ext='Storable Encode XS/Typemap MIME/Base64 IO B/C Devel/Peek
Time/HiRes Opcode attrs PerlIO/scalar ByteLoader Unicode/Normalize re B
XS/APItest Encode/Unicode SDBM_File PerlIO/via PerlIO/encoding Fcntl
Sys/Hostname Digest/MD5 Devel/PPPort POSIX Filter/Util/Call Socket
threads/shared Data/Dumper threads List/Util File/Glob Devel/DProf Cwd'
eagain='EAGAIN'
ebcdic=''
echo='echo'
egrep='egrep'
emacs=''
endgrent_r_proto='0'
endhostent_r_proto='0'
endnetent_r_proto='0'
endprotoent_r_proto='0'
endpwent_r_proto='0'
endservent_r_proto='0'
eunicefix='​:'
exe_ext='.exe'
expr='expr'
extensions='Storable Encode XS/Typemap MIME/Base64 IO B/C Devel/Peek
Time/HiRes Opcode attrs PerlIO/scalar ByteLoader Unicode/Normalize re B
XS/APItest Encode/Unicode SDBM_File PerlIO/via PerlIO/encoding Fcntl
Sys/Hostname Digest/MD5 Devel/PPPort POSIX Filter/Util/Call Socket
threads/shared Data/Dumper threads List/Util File/Glob Devel/DProf Cwd'
extras=''
fflushNULL='define'
fflushall=''
find='find'
firstmakefile='makefile'
flex=''
fpossize='8'
fpostype='fpos_t'
freetype='void'
full_ar=''
full_csh=''
full_sed=''
gccosandvers=''
gccversion=''
getgrent_r_proto='0'
getgrgid_r_proto='0'
getgrnam_r_proto='0'
gethostbyaddr_r_proto='0'
gethostbyname_r_proto='0'
gethostent_r_proto='0'
getlogin_r_proto='0'
getnetbyaddr_r_proto='0'
getnetbyname_r_proto='0'
getnetent_r_proto='0'
getprotobyname_r_proto='0'
getprotobynumber_r_proto='0'
getprotoent_r_proto='0'
getpwent_r_proto='0'
getpwnam_r_proto='0'
getpwuid_r_proto='0'
getservbyname_r_proto='0'
getservbyport_r_proto='0'
getservent_r_proto='0'
getspnam_r_proto='0'
gidformat='"ld"'
gidsign='-1'
gidsize='4'
gidtype='gid_t'
glibpth='/usr/shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib
/usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib
/usr/ucblib /usr/shlib '
gmake='gmake'
gmtime_r_proto='0'
grep='grep'
groupcat=''
groupstype='gid_t'
gzip='gzip'
h_fcntl='false'
h_sysfile='true'
hint='recommended'
hostcat='ypcat hosts'
i16size='2'
i16type='short'
i32size='4'
i32type='long'
i64size='8'
i64type='__int64'
i8size='1'
i8type='char'
i_arpainet='define'
i_bsdioctl=''
i_crypt=''
i_db=''
i_dbm=''
i_dirent='define'
i_dld=''
i_dlfcn='define'
i_fcntl='define'
i_float='define'
i_fp=''
i_fp_class=''
i_gdbm=''
i_grp=''
i_ieeefp=''
i_inttypes=''
i_langinfo=''
i_libutil=''
i_limits='define'
i_locale='define'
i_machcthr=''
i_malloc='define'
i_math='define'
i_memory=''
i_mntent=''
i_ndbm=''
i_netdb=''
i_neterrno=''
i_netinettcp=''
i_niin=''
i_poll=''
i_prot=''
i_pthread=''
i_pwd=''
i_rpcsvcdbm='define'
i_sfio=''
i_sgtty=''
i_shadow=''
i_socks=''
i_stdarg='define'
i_stddef='define'
i_stdlib='define'
i_string='define'
i_sunmath=''
i_sysaccess=''
i_sysdir=''
i_sysfile=''
i_sysfilio='define'
i_sysin=''
i_sysioctl=''
i_syslog=''
i_sysmman=''
i_sysmode=''
i_sysmount=''
i_sysndir=''
i_sysparam=''
i_sysresrc=''
i_syssecrt=''
i_sysselct=''
i_syssockio=''
i_sysstat='define'
i_sysstatfs=''
i_sysstatvfs=''
i_systime=''
i_systimek=''
i_systimes=''
i_systypes='define'
i_sysuio=''
i_sysun=''
i_sysutsname=''
i_sysvfs=''
i_syswait=''
i_termio=''
i_termios=''
i_time='define'
i_unistd=''
i_ustat=''
i_utime='define'
i_values=''
i_varargs=''
i_varhdr='varargs.h'
i_vfork=''
ignore_versioned_solibs=''
inc_version_list=''
inc_version_list_init='0'
incpath='\include'
inews=''
installarchlib='C​:\TEMP\perl--------------------------------------------
please-run-the-install-script-------------------------------------------
\lib'
installbin='U​:\bin'
installhtmldir='U​:\html'
installhtmlhelpdir='U​:\htmlhelp'
installman1dir=''
installman3dir=''
installprefix='U​:'
installprefixexp='U​:'
installprivlib='C​:\TEMP\perl--------------------------------------------
please-run-the-install-script-------------------------------------------
\lib'
installscript='U​:\bin'
installsitearch='U​:\site\lib'
installsitebin='U​:\bin'
installsitelib='U​:\site\lib'
installstyle='lib'
installusrbinperl=''
installvendorarch=''
installvendorbin=''
installvendorlib=''
intsize='4'
issymlink=''
ivdformat='"ld"'
ivsize='4'
ivtype='long'
known_extensions='B B/C ByteLoader Cwd Data/Dumper Devel/DProf
Devel/PPPort Devel/Peek Digest/MD5 Encode Encode/Byte Encode/CN
Encode/EBCDIC Encode/JP Encode/KR Encode/Symbol Encode/TW Encode/Unicode
Errno Fcntl File/Glob Filter/Util/Call IO List/Util MIME/Base64 Opcode
POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable
Sys/Hostname Thread Time/HiRes Unicode/Normalize XS/APItest XS/Typemap
attrs re threads threads/shared'
ksh=''
ld='link'
lddlflags='-dll -nologo -nodefaultlib -debug -opt​:ref,icf
-libpath​:"C​:\TEMP\perl--------------------------------------------please
-run-the-install-script-------------------------------------------\lib\C
ORE" -machine​:x86'
ldflags='-nologo -nodefaultlib -debug -opt​:ref,icf
-libpath​:"C​:\TEMP\perl--------------------------------------------please
-run-the-install-script-------------------------------------------\lib\C
ORE" -machine​:x86'
ldflags_uselargefiles=''
ldlibpthname=''
less='less'
lib_ext='.lib'
libc='msvcrt.lib'
libperl='perl58.lib'
libpth='\lib'
libs=' oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib msvcrt.lib'
libsdirs=''
libsfiles=''
libsfound=''
libspath=''
libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun
m c cposix posix ndir dir crypt ucb bsd BSD PW x'
line='line'
lint=''
lkflags=''
ln=''
lns='copy'
localtime_r_proto='0'
locincpth='/usr/local/include /opt/local/include /usr/gnu/include
/opt/gnu/include /usr/GNU/include /opt/GNU/include'
loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib
/usr/GNU/lib /opt/GNU/lib'
longdblsize='10'
longlongsize='8'
longsize='4'
lp=''
lpr=''
ls='dir'
lseeksize='8'
lseektype='__int64'
mail=''
mailx=''
make='nmake'
make_set_make='#'
mallocobj='malloc.o'
mallocsrc='malloc.c'
malloctype='void *'
man1dir=''
man1direxp=''
man1ext='1'
man3dir=''
man3direxp=''
man3ext='3'
mips_type=''
mkdir='mkdir'
mmaptype='void *'
modetype='mode_t'
more='more /e'
multiarch=''
mv=''
myarchname='MSWin32'
mydomain=''
myhostname=''
myuname=''
n='-n'
need_va_copy=''
netdb_hlen_type='int'
netdb_host_type='char *'
netdb_name_type='char *'
netdb_net_type='long'
nm=''
nm_opt=''
nm_so_opt=''
nonxs_ext='Encode/TW Encode/Byte Errno Encode/KR Encode/EBCDIC Encode/JP
Encode/Symbol Encode/CN'
nroff=''
nvEUformat='"E"'
nvFUformat='"F"'
nvGUformat='"G"'
nv_preserves_uv_bits='32'
nveformat='"e"'
nvfformat='"f"'
nvgformat='"g"'
nvsize='8'
nvtype='double'
o_nonblock='O_NONBLOCK'
obj_ext='.obj'
old_pthread_create_joinable=''
optimize='-MD -Zi -DNDEBUG -O1'
orderlib='false'
osname='MSWin32'
osvers='4.0'
otherlibdirs=''
package='perl5'
pager='more /e'
passcat=''
patchlevel=''
path_sep=';'
perl='perl'
perl5=''
perladmin=''
perllibs=' oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib msvcrt.lib'
perlpath='U​:\bin\perl.exe'
pg=''
phostname='hostname'
pidtype='int'
plibpth=''
pmake=''
pr=''
prefix='C​:\TEMP\perl--------------------------------------------please-r
un-the-install-script-------------------------------------------'
prefixexp='U​:'
privlib='U​:\lib'
privlibexp='C​:\TEMP\perl--------------------------------------------plea
se-run-the-install-script-------------------------------------------\lib
'
procselfexe=''
prototype='define'
ptrsize='4'
quadkind='5'
quadtype='__int64'
randbits='15'
randfunc='rand'
random_r_proto='0'
randseedtype='unsigned'
ranlib='rem'
rd_nodata='-1'
readdir64_r_proto='0'
readdir_r_proto='0'
revision='5'
rm='del'
rmail=''
runnm='true'
sPRIEUldbl='"E"'
sPRIFUldbl='"F"'
sPRIGUldbl='"G"'
sPRIXU64='"lX"'
sPRId64='"ld"'
sPRIeldbl='"e"'
sPRIfldbl='"f"'
sPRIgldbl='"g"'
sPRIi64='"li"'
sPRIo64='"lo"'
sPRIu64='"lu"'
sPRIx64='"lx"'
sSCNfldbl='"f"'
sched_yield=''
scriptdir='U​:\bin'
scriptdirexp='U​:\bin'
sed='sed'
seedfunc='srand'
selectminbits='32'
selecttype='Perl_fd_set *'
sendmail='blat'
setgrent_r_proto='0'
sethostent_r_proto='0'
setlocale_r_proto='0'
setnetent_r_proto='0'
setprotoent_r_proto='0'
setpwent_r_proto='0'
setservent_r_proto='0'
sh='cmd /x /c'
shar=''
sharpbang='#!'
shmattype='void *'
shortsize='2'
shrpenv=''
shsharp='true'
sig_count='26'
sig_name='ZERO HUP INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV
NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24
CONT CLD'
sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06",
"NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM",
"TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT",
"STOP", "NUM24", "CONT", "CLD", 0'
sig_num='0 1 2 21 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
24 25 20'
sig_num_init='0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
sig_size='27'
signal_t='void'
sitearch='U​:\site\lib'
sitearchexp='U​:\site\lib'
sitebin='U​:\site\bin'
sitebinexp='U​:\site\bin'
sitelib='U​:\site\lib'
sitelib_stem=''
sitelibexp='U​:\site\lib'
siteprefix='U​:\site'
siteprefixexp='U​:\site'
sizesize='4'
sizetype='size_t'
sleep=''
smail=''
so='dll'
sockethdr=''
socketlib=''
socksizetype='int'
sort='sort'
spackage='Perl5'
spitshell=''
srand48_r_proto='0'
srandom_r_proto='0'
src=''
ssizetype='int'
startperl='#!perl'
startsh='#!/bin/sh'
static_ext=''
stdchar='char'
stdio_base='((fp)->_base)'
stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)'
stdio_cnt='((fp)->_cnt)'
stdio_filbuf=''
stdio_ptr='((fp)->_ptr)'
stdio_stream_array=''
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
subversion=''
sysman='/usr/man/man1'
tail=''
tar=''
targetarch=''
tbl=''
tee=''
test=''
timeincl='/usr/include/sys/time.h '
timetype='time_t'
tmpnam_r_proto='0'
touch='touch'
tr=''
trnl='\012'
troff=''
ttyname_r_proto='0'
u16size='2'
u16type='unsigned short'
u32size='4'
u32type='unsigned long'
u64size='8'
u64type='unsigned __int64'
u8size='1'
u8type='unsigned char'
uidformat='"ld"'
uidsign='-1'
uidsize='4'
uidtype='uid_t'
uname='uname'
uniq='uniq'
uquadtype='unsigned __int64'
use5005threads=''
use64bitall=''
use64bitint=''
usecrosscompile=''
usedl='define'
usefaststdio='define'
useithreads='define'
uselargefiles='define'
uselongdouble=''
usemorebits=''
usemultiplicity='define'
usemymalloc='n'
usenm='false'
useopcode='true'
useperlio='define'
useposix='true'
usereentrant=''
usesfio='false'
useshrplib='yes'
usesocks=''
usethreads='define'
usevendorprefix=''
usevfork='false'
usrinc='/usr/include'
uuname=''
uvXUformat='"lX"'
uvoformat='"lo"'
uvsize='4'
uvtype='unsigned long'
uvuformat='"lu"'
uvxformat='"lx"'
vendorarch=''
vendorarchexp=''
vendorbin=''
vendorbinexp=''
vendorlib=''
vendorlib_stem=''
vendorlibexp=''
vendorprefix=''
vendorprefixexp=''
version='5.8.6'
version_patchlevel_string='version 8 subversion 6'
versiononly=''
vi=''
voidflags='15'
xlibpth='/usr/lib/386 /lib/386'
zcat=''
zip='zip'

@p5pRT
Copy link
Author

p5pRT commented Jul 11, 2006

From a.r.ferreira@gmail.com

On 7/11/06, via RT Artyom Tseitlin <perlbug-followup@​perl.org> wrote​:

# New Ticket Created by "Artyom Tseitlin"
# Please include the string​: [perl #39789]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=39789 >

[snip]

Wrong syntax error.
Use of the '/' operator makes Switch modul to fail.

This kind of error is due to the same point mentioned in the
documentation of Switch.

  Due to the heuristic nature of Switch.pm's source parsing,
  the presence of regexes specified with raw ?...? delimiters
  may cause mysterious errors. The workaround is to use m?...? instead.

In this case, the unbalanced '/' causes the mysterious error. You can
get rid of it with a trick​: replace

    $freq = $1/1000000;

with

    $freq = $1/1000000; \# /

This '/' in comment balances the occurrences of the bracket. Of
course, a real fix is much better, but it may take longer.

@p5pRT
Copy link
Author

p5pRT commented Jul 11, 2006

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

@p5pRT
Copy link
Author

p5pRT commented Jul 11, 2006

From a.r.ferreira@gmail.com

On 7/11/06, Adriano Ferreira <a.r.ferreira@​gmail.com> wrote​:

On 7/11/06, via RT Artyom Tseitlin <perlbug-followup@​perl.org> wrote​:

# New Ticket Created by "Artyom Tseitlin"
# Please include the string​: [perl #39789]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=39789 >

Use of the '/' operator makes Switch modul to fail.

A tiny script follows which exhibit the same error​: it must have
something to do with Text​::Balanced or the way Switch.pm uses it.

use Switch;

$x = $a/$b;

switch ($c) {
  case 'a' { ; }
}

# /

A balanced construction opens at "$x = $a/$b;" because of / occurrence
and follows up to the end of the file at "# /".

$ perl -c bad-slash.pl
String found where operator expected at xx.pl line 7, near "case 'a'"
  (Do you need to predeclare case?)
syntax error at xx.pl line 6, near ") {"
xx.pl had compilation errors.

@p5pRT
Copy link
Author

p5pRT commented Jul 11, 2006

From @tamias

On Tue, Jul 11, 2006 at 01​:56​:38PM -0300, Adriano Ferreira wrote​:

On 7/11/06, Adriano Ferreira <a.r.ferreira@​gmail.com> wrote​:

On 7/11/06, via RT Artyom Tseitlin <perlbug-followup@​perl.org> wrote​:

# New Ticket Created by "Artyom Tseitlin"
# Please include the string​: [perl #39789]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=39789 >

Use of the '/' operator makes Switch modul to fail.

A tiny script follows which exhibit the same error​: it must have
something to do with Text​::Balanced or the way Switch.pm uses it.

You are correct. The problem involves Text​::Balanced​::_match_quotelike(),
which matches the / as the start of a regular expression rather than a
division operator. Unfortunately, fixing this bug would be very difficult.

See also​: http​://rt.perl.org/rt3//Public/Bug/Display.html?id=34233

Ronald

@p5pRT
Copy link
Author

p5pRT commented Jul 11, 2006

From @Tux

On Tue, 11 Jul 2006 13​:54​:13 -0400, Ronald J Kimball
<rjk-perl-p5p@​tamias.net> wrote​:

On Tue, Jul 11, 2006 at 01​:56​:38PM -0300, Adriano Ferreira wrote​:

On 7/11/06, Adriano Ferreira <a.r.ferreira@​gmail.com> wrote​:

On 7/11/06, via RT Artyom Tseitlin <perlbug-followup@​perl.org> wrote​:

# New Ticket Created by "Artyom Tseitlin"
# Please include the string​: [perl #39789]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=39789 >

Use of the '/' operator makes Switch modul to fail.

A tiny script follows which exhibit the same error​: it must have
something to do with Text​::Balanced or the way Switch.pm uses it.

You are correct. The problem involves Text​::Balanced​::_match_quotelike(),
which matches the / as the start of a regular expression rather than a
division operator. Unfortunately, fixing this bug would be very difficult.

See also​: http​://rt.perl.org/rt3//Public/Bug/Display.html?id=34233

Near to impossible now that we have (and use) defined-or.

// rules

For me, Switch.pm is therefor dead/unusable, as 95% of my scripts use
defined-or and will do so in the future.

--
H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.0, AIX 4.3 & 5.2, and Cygwin. http​://qa.perl.org
http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org
  http​://www.goldmark.org/jeff/stupid-disclaimers/

@p5pRT
Copy link
Author

p5pRT commented Jul 11, 2006

From a.r.ferreira@gmail.com

On 7/11/06, Ronald J Kimball <rjk-perl-p5p@​tamias.net> wrote​:

You are correct. The problem involves Text​::Balanced​::_match_quotelike(),
which matches the / as the start of a regular expression rather than a
division operator. Unfortunately, fixing this bug would be very difficult.

See also​: http​://rt.perl.org/rt3//Public/Bug/Display.html?id=34233

Ronald

So I think this ticket may be merged into #34233 and wait until
doomsday when a Text​::Balanced-enlightened mind gets rid of this bug.

@p5pRT
Copy link
Author

p5pRT commented Jul 20, 2006

From @smpeters

On Tue Jul 11 11​:12​:27 2006, ferreira2 wrote​:

On 7/11/06, Ronald J Kimball <rjk-perl-p5p@​tamias.net> wrote​:

You are correct. The problem involves
Text​::Balanced​::_match_quotelike(),
which matches the / as the start of a regular expression rather than
a
division operator. Unfortunately, fixing this bug would be very
difficult.

See also​: http​://rt.perl.org/rt3//Public/Bug/Display.html?id=34233

Ronald

So I think this ticket may be merged into #34233 and wait until
doomsday when a Text​::Balanced-enlightened mind gets rid of this bug.

Merging....

By the way, in bleadperl, wouldn't it make sense to turn switch into a
thin wrapper over the given/when syntax being added.

@p5pRT
Copy link
Author

p5pRT commented Jul 20, 2006

From @nwc10

On Thu, Jul 20, 2006 at 09​:52​:24AM -0700, Steve Peters via RT wrote​:

Merging....

By the way, in bleadperl, wouldn't it make sense to turn switch into a
thin wrapper over the given/when syntax being added.

I thought this, but I belive it's not trivial to get close to 100% as

1​: bleadperl's given/when has different semantics (not sure how different)
2​: Switch actually offers two variants already (not sure how different)

So I've no idea "how not trivial" it is. I might be wrong, it might be easy.
I wonder if solving this would scratch anyone's itch.

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Sep 27, 2010

From @cpansprout

This is the same as the CPAN bug here​:
https://rt.cpan.org/Ticket/Display.html?id=48708

@p5pRT
Copy link
Author

p5pRT commented Sep 27, 2010

@cpansprout - Status changed from 'open' to 'rejected'

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

No branches or pull requests

1 participant