Mailing List Archive

dynaloader
Tim,

I just applied your patches for DynaLoader (3 & 4).

When I did

perl -c DynaLoader.pm

I got a few messages of the form

String found where operator expected at DynaLoader.pm line 76, near "Carp::confess "Usage: DynaLoader::bootstrap(module)""
(Do you need to predeclare Carp::confess?)
syntax error at DynaLoader.pm line 76, next token ???
DynaLoader.pm had compilation errors.

They all related to calls to Carp::confess or Carp::croak, like this

Carp::confess "Usage: DynaLoader::bootstrap(module)" unless $module;

All were fixed by putting the string parameter in parenthesis.

Have I missed an additional patch?

Paul
Re: dynaloader [ In reply to ]
Tim Bunce writes:
> >
> > I got a few messages of the form
> >
> > String found where operator expected at DynaLoader.pm line 76, near "Carp::confess "Usage: DynaLoader::bootstrap(module)""
> > (Do you need to predeclare Carp::confess?)
> > syntax error at DynaLoader.pm line 76, next token ???
> > DynaLoader.pm had compilation errors.
> >
> > They all related to calls to Carp::confess or Carp::croak, like this
> >
> > Carp::confess "Usage: DynaLoader::bootstrap(module)" unless $module;
> >
> > All were fixed by putting the string parameter in parenthesis.
>

What about declaring it a parser bug?

Ilya
Re: dynaloader [ In reply to ]
Re: dynaloader [ In reply to ]
> From: Ilya Zakharevich <ilya@math.ohio-state.edu>
>
> Tim Bunce writes:
> > >
> > > I got a few messages of the form
> > >
> > > String found where operator expected at DynaLoader.pm line 76, near "Carp::confess "Usage: DynaLoader::bootstrap(module)""
> > > (Do you need to predeclare Carp::confess?)
> > > syntax error at DynaLoader.pm line 76, next token ???
> > > DynaLoader.pm had compilation errors.
> > >
> > > They all related to calls to Carp::confess or Carp::croak, like this
> > >
> > > Carp::confess "Usage: DynaLoader::bootstrap(module)" unless $module;
> > >
> > > All were fixed by putting the string parameter in parenthesis.
> >
>
> What about declaring it a parser bug?

I don't think it's unreasonable for perl to complain when it sees

Foo "...";

if it's never heard of Foo before.

Especially since it gives such a helpful error message :-)

Tim.