start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 8.132 Socket Chapter 8
Standard Modules
Next: 8.134 subs
 

8.133 strict

Pragma for doing strict error checking within the current block. Can be turned off by prefixing with no :

use strict 'vars';  ...  no strict 'vars';
Provides three kinds of restriction:
strict 'refs'

Generates runtime error if you use any symbolic references.

strict 'subs'

Generates compile-time error if you use a bareword identifier that's not a predeclared subroutine.

strict 'vars'

Generates compile-time error if you access a variable that wasn't declared via my , isn't fully qualified, or wasn't imported.

use strict by itself (with no import list) is the most restrictive, causing all possible restrictions to be imposed.


Previous: 8.132 Socket Perl in a Nutshell Next: 8.134 subs
8.132 Socket Book Index 8.134 subs