Penguin
Diff: perllexwarn(1)
EditPageHistoryDiffInfoLikePages

Differences between current version and predecessor to the previous major change of perllexwarn(1).

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 2 Last edited on Monday, June 3, 2002 6:50:47 pm by perry
Older page: version 1 Last edited on Monday, June 3, 2002 6:50:47 pm by perry Revert
@@ -342,28 +342,28 @@
 has enabled warnings via the warnings 
 pragma. 
  
  
-Consider the module MyMod::Abc below. 
+Consider the module ! MyMod::Abc below. 
  
  
- package MyMod::Abc; 
+ package ! MyMod::Abc; 
  use warnings::register; 
  sub open { 
 my $path = shift ; 
 if (warnings::enabled() 
  1 ; 
-The call to warnings::register will create a new warnings category called ``MyMod::abc'', i.e. the new category name matches the current package name. The open function in the module will display a warning message if it gets given a relative path as a parameter. This warnings will only be displayed if the code that uses MyMod::Abc has actually enabled them with the warnings pragma like below. 
+The call to warnings::register will create a new warnings category called ``! MyMod::abc'', i.e. the new category name matches the current package name. The open function in the module will display a warning message if it gets given a relative path as a parameter. This warnings will only be displayed if the code that uses ! MyMod::Abc has actually enabled them with the warnings pragma like below. 
  
  
- use MyMod::Abc;  
-use warnings 'MyMod::Abc'; 
+ use ! MyMod::Abc;  
+use warnings '! MyMod::Abc'; 
 ... 
 abc::open( 
 It is also possible to test whether the pre-defined warnings categories are set in the calling module with the warnings::enabled function. Consider this snippet of code: 
  
  
- package MyMod::Abc; 
+ package ! MyMod::Abc; 
  sub open { 
 warnings::warnif( 
  sub new 
 ... 
@@ -371,15 +371,15 @@
 The function open has been deprecated, so code has been included to display a warning message whenever the calling module has (at least) the ``deprecated'' warnings category enabled. Something like this, say. 
  
  
  use warnings 'deprecated'; 
-use MyMod::Abc; 
+use ! MyMod::Abc; 
 ... 
-MyMod::Abc::open($filename) ; 
+! MyMod::Abc::open($filename) ; 
 Either the warnings::warn or warnings::warnif function should be used to actually display the warnings message. This is because they can make use of the feature that allows warnings to be escalated into fatal errors. So in this case 
  
  
- use MyMod::Abc; 
+ use ! MyMod::Abc; 
 use warnings FATAL = 
 the warnings::warnif function will detect this and die after displaying the warning message. 
  
  
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.