ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы.



7.2.60 subs - Predeclare Subroutine Names

use subs qw(sub1 sub2 sub3);
sub1 $arg1, $arg2;

This predeclares the subroutines whose names are in the list, allowing you to use them without parentheses even before they're defined. It has the additional benefit of allowing you to override built-in functions, since you may only override built-ins via an import, and this pragma does a pseudo-import.

See also the vars module.


Previous: 7.2.59 strict - Restrict Unsafe ConstructsProgramming PerlNext: 7.2.61 Symbol - Generate Anonymous Globs; Qualify Variable Names
7.2.59 strict - Restrict Unsafe ConstructsBook Index7.2.61 Symbol - Generate Anonymous Globs; Qualify Variable Names