demerphq has asked for the wisdom of the Perl Monks concerning the following question:
wont compile '(Do you need to predeclare Carp::croak?)' butrequire Carp; Carp::croak "This will produce a compile time error.";
is fine and so isuse Carp; Carp::croak "This will compile fine.";
I know that warnings does the use Carp; so the two are the same really, but why should it make a difference if Carp is used or required when the usage is via a fully qualified function call? I mean using a different module as the example works fine, so whats with Carp?use warnings; require Carp; Carp::croak "And so will this.";
Thanks in advance...require Data::Dumper; print Data::Dumper::Dumper([qw(This is good too)]);
Yves / DeMerphq
--
When to use Prototypes?
Advanced Sorting - GRT - Guttman Rosler Transform
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 'require Carp;' has differnet meanings under 'use warnings;'?
by demerphq (Chancellor) on Mar 12, 2002 at 15:06 UTC | |
by Juerd (Abbot) on Mar 13, 2002 at 15:46 UTC | |
|
Re: 'require Carp;' has differnet meanings under 'use warnings;'?
by VSarkiss (Monsignor) on Mar 12, 2002 at 15:44 UTC |