in reply to Help Debug Switch.pm!

I've played with Switch.pm (version 2.01) but have pretty much given up on it for production work. It works well in the small but when I use it in large script (>600 lines) I get weird errors, usually involving code several lines after a switch statement, containing a single-quoted string. The parser complains about barewords, which in turn is because it thought it had an single-quoted string open and so tries to interpret the string's contents as Perl.

I'll see if I can dig up an example of this different error message. In the meantime:

% perl petruchio
syntax error at petruchio line 8, near "){"
String found where operator expected at petruchio line 9, near "case 'y'"
        (Do you need to predeclare case?)
Execution of petruchio aborted due to compilation errors.
% perl -MText::Balanced -le 'print $Text::Balanced::VERSION'
1.83

% perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos ouessant 5.6 generic_105181-05 sun4u sparc sunw,ultra-4 '
    config_args=''
    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='gcc', optimize='-O', gccversion=2.8.1
    cppflags='-I/usr/local/include'
    ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Sep 26 2000 18:27:15
  [...]

--
g r i n d e r