A Perl pragma to restrict unsafe constructs.

Typically, Perl is fairly relaxed of what you can do; All global variables are global and get created automatically, for example.

Thus, the use of strict pragma - "use strict;", along with the -w interpreter command line parameter or the warnings pragma, is very useful to catch "bad habits" and typos in variable names.

The pragma comes in three variants. Typically all are in use at once, but you can enable disable these at will with use strict "this";, no strict "that"; - or just use use strict; to use all three by default.

use strict "vars";
Gives runtime errors if variables not declared previously are used. Use something like use vars pragma, our, my, or such to declare them.
use strict "refs";
Gives runtime errors if symbolic references are used.
use strict "subs";
Gives runtime errors if you use a bareword that's not a subroutine, unless it's clearly a hash key or similiar.

Strict (?), a. [Compar. Stricter (?); superl. Strictest.] [L. strictus, p.p. of stringere to draw or bind tight, to strain. See Strain, and cf. Strait, a.]

1.

Strained; drawn close; tight; as, a strict embrace; a strict ligature.

Dryden.

2.

Tense; not relaxed; as, a strict fiber.

3.

Exact; accurate; precise; rigorously nice; as, to keep strict watch; to pay strict attention.

Shak.

It shall be still in strictest measure. Milton.

4.

Governed or governing by exact rules; observing exact rules; severe; rigorous; as, very strict in observing the Sabbath.

"Through the strict senteries."

Milton.

5.

Rigidly; interpreted; exactly limited; confined; restricted; as, to understand words in a strict sense.

6. Bot.

Upright, or straight and narrow; -- said of the shape of the plants or their flower clusters.

Syn. -- Exact; accurate; nice; close; rigorous; severe. -- Strict, Severe. Strict, applied to a person, denotes that he conforms in his motives and acts to a principle or code by which he is bound; severe is strict with an implication often, but not always, of harshness. Strict is opposed to lax; severe is opposed to gentle.

And rules as strict his labored work confine, As if the Stagirite o'erlooked each line. Pope.

Soon moved with touch of blame, thus Eve: - "What words have passed thy lips, Adam severe!" Milton.

The Strict Observance, ∨ Friars of the Strict Observance. R. C. Ch. See Observance.

 

© Webster 1913.

Log in or register to write something here or to contact authors.