|No such thing as a small change|
Use of Carp outside of package won't compile...by memnoch (Scribe)
|on Dec 18, 2007 at 16:12 UTC||Need Help??|
memnoch has asked for the wisdom of the Perl Monks concerning the following question:
The following code does not compile:
and produces the following output:
But if I put the "use Carp qw(croak);" statement after the package it does work:
I don't understand why the "use Carp qw(croak)" seemingly must be declared after the package, but the "use strict" doesn't. How could I determine what is necessary for other "use" statements?
If someone could offer some insight as to what I'm not understanding, I'd really appreciate it.