On Thu, May 08, 2008 at 08:00:44AM +0300, Niko Tyni wrote:
> On Wed, May 07, 2008 at 08:01:55PM -0700, Matt Kraai wrote:
> > Package: perl-modules
> > Version: 5.8.8-12
> > 
> > When I execute the attached script, it produces the following errors:
> > 
> > > String found where operator expected at /tmp/plan line 16, near "case 
> > > 'add'"
> > >   (Do you need to predeclare case?)
> > > syntax error at /tmp/plan line 15, near ") {"
> > > Execution of /tmp/plan aborted due to compilation errors.
> > 
> > Since seemingly unrelated things (e.g., removing a newline from one of
> > the here documents) eliminates the syntax error, I think this is a bug
> > in the Switch module.
> 
> Hi Matt,
> 
> I think you forgot the attachment.

Oops, sorry about that.  Here it is.

-- 
Matt
#!/usr/bin/perl

use Switch;

sub create_tables {
    my $connection;
    $connection->foo(<<'EOS');

EOS
    $connection->foo(<<'EOS');

EOS
}

switch (shift @ARGV) {
    case 'add' {
    }
}

Reply via email to