1N/Apackage subs;
1N/A
1N/Aour $VERSION = '1.00';
1N/A
1N/A=head1 NAME
1N/A
1N/Asubs - Perl pragma to predeclare sub names
1N/A
1N/A=head1 SYNOPSIS
1N/A
1N/A use subs qw(frob);
1N/A frob 3..10;
1N/A
1N/A=head1 DESCRIPTION
1N/A
1N/AThis will predeclare all the subroutine whose names are
1N/Ain the list, allowing you to use them without parentheses
1N/Aeven before they're declared.
1N/A
1N/AUnlike pragmas that affect the C<$^H> hints variable, the C<use vars> and
1N/AC<use subs> declarations are not BLOCK-scoped. They are thus effective
1N/Afor the entire file in which they appear. You may not rescind such
1N/Adeclarations with C<no vars> or C<no subs>.
1N/A
1N/ASee L<perlmodlib/Pragmatic Modules> and L<strict/strict subs>.
1N/A
1N/A=cut
1N/A
1N/Arequire 5.000;
1N/A
1N/Asub import {
1N/A my $callpack = caller;
1N/A my $pack = shift;
1N/A my @imports = @_;
1N/A foreach $sym (@imports) {
1N/A *{"${callpack}::$sym"} = \&{"${callpack}::$sym"};
1N/A }
1N/A};
1N/A
1N/A1;