📄 subs.pm
字号:
package subs;our $VERSION = '1.00';=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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -