Front page | perl.perl5.porters |
Postings from February 2007
Re: predeclare?
Thread Previous
From:
Rafael Garcia-Suarez
Date:
February 28, 2007 07:53
Subject:
Re: predeclare?
Message ID:
b77c1dce0702280753r5d4a86e1i1b0157e425084087@mail.gmail.com
On 28/02/07, Jerry D. Hedden <jdhedden@yahoo.com> wrote:
> I have a module with the following construct:
>
> require Carp;
> Carp::croak 'message...';
>
> It works fine under 5.8.8. However, under blead it generates:
>
> String found where operator expected at ..., near "Carp::croak
> 'message...'"
> (Do you need to predeclare Carp::croak?)
> syntax error at ..., near "Carp::croak 'message...'"
> Execution of ... aborted due to compilation errors.
>
> Where is this now documented? (I presume it's not a bug.)
It's an unfortunate side-effect.
It's documented in perl595delta:
The C<warnings> pragma doesn't load C<Carp> anymore. That means that code
that used C<Carp> routines without having loaded it at compile time might
need to be adjusted; typically, the following (faulty) code won't work
anymore, and will require parentheses to be added after the function name:
use warnings;
require Carp;
Carp::confess "argh";
Thread Previous