subs.pm

来自「MSYS在windows下模拟了一个类unix的终端」· PM 代码 · 共 39 行

PM
39
字号
package subs;=head1 NAMEsubs - Perl pragma to predeclare sub names=head1 SYNOPSIS    use subs qw(frob);    frob 3..10;=head1 DESCRIPTIONThis will predeclare all the subroutine whose names are in the list, allowing you to use them without parentheseseven before they're declared.Unlike pragmas that affect the C<$^H> hints variable, the C<use vars> andC<use subs> declarations are not BLOCK-scoped.  They are thus effectivefor the entire file in which they appear.  You may not rescind suchdeclarations with C<no vars> or C<no subs>.See L<perlmodlib/Pragmatic Modules> and L<strict/strict subs>.=cutrequire 5.000;sub import {    my $callpack = caller;    my $pack = shift;    my @imports = @_;    foreach $sym (@imports) {	*{"${callpack}::$sym"} = \&{"${callpack}::$sym"};    }};1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?