|Keep It Simple, Stupid|
Re: Compiling Smart::Comments with "-Wc"by jarich (Curate)
|on Nov 27, 2005 at 12:55 UTC||Need Help??|
Perl is case sensitive. Thus writing:
is not the same as writing:
The latter (with the small w) says turn on warnings for your code. The former says turn on warnings even if parts of the code use no warnings or some other construct to turn off warnings.
Chances are that you don't really want to be using -W almost ever when compiling your code. But you do want to use -w.
An important thing to know is that that error message has nothing to do with your code. Your current document isn't being replaced. What is happening is the following:
The error you're seeing is being generated in step 2. Something in Smart::Comments' dependancies results in UNIVERSAL::VERSION being defined more than once. This may or may not be a bug. If it's done inside an area which explicitly turns warnings off then generally you won't see this warning. Unless you use -W rather than -w.
Basic summary: do your compile checks with -wc rather than -Wc (this isn't C), because generally module authors usually turn off warnings only when they really mean it.
Hope this helpsjarich