in reply to 'require Carp;' has differnet meanings under 'use warnings;'?
The reason for the difference is that 'require' is a runtime directive whereas 'use' is a compile time directive. Now since I left off the parens on the croak the croak needs to be defined for perl not to get confused. So the way to solve this problem is either use the parens (best choice I would say) or to wrap the require statements in a BEGIN block.
*sigh* So many subtleties, so little time...
BTW: tye provided a little quote in the CB that I think is useful so Ill repeat
tye: don't get confused into thinking that there is one "compile time" and one "run time". Each line (or less) of code can have different compile/run times
Thanks all.
Yves / DeMerphq
--
When to use Prototypes?
Advanced Sorting - GRT - Guttman Rosler Transform
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: 'require Carp;' has differnet meanings under 'use warnings;'?
by Juerd (Abbot) on Mar 13, 2002 at 15:46 UTC |