The Perl warnings are those in which Perl checks the quality of the code that you have produced. Mandatory warnings highlight problems in the lexical analysis stage. Optional warnings highlight cases of possible anomaly.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
usewarnings;# it is same as importing "all"
nowarnings;# it is same as unimporting "all"
usewarnings::register;
if(warnings::enabled()){
warnings::warn("any warning");
}
if(warnings::enabled("void")){
warnings::warn("void","any warning");
}
|