1subs(3pm)              Perl Programmers Reference Guide              subs(3pm)
2
3
4

NAME

6       subs - Perl pragma to predeclare subroutine names
7

SYNOPSIS

9           use subs qw(frob);
10           frob 3..10;
11

DESCRIPTION

13       This will predeclare all the subroutines whose names are in the list,
14       allowing you to use them without parentheses (as list operators) even
15       before they're declared.
16
17       Unlike pragmas that affect the $^H hints variable, the "use vars" and
18       "use subs" declarations are not lexically scoped to the block they
19       appear in: they affect the entire package in which they appear.  It is
20       not possible to rescind these declarations with "no vars" or "no subs".
21
22       See "Pragmatic Modules" in perlmodlib and "strict subs" in strict.
23
24
25
26perl v5.38.2                      2023-11-30                         subs(3pm)
Impressum