This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update to MakeMaker 5.34
[perl5.git] / lib / subs.pm
CommitLineData
a0d0e21e
LW
1package subs;
2
f06db76b
AD
3=head1 NAME
4
5subs - Perl pragma to predeclare sub names
6
7=head1 SYNOPSIS
8
9 use subs qw(frob);
10 frob 3..10;
11
12=head1 DESCRIPTION
13
14This will predeclare all the subroutine whose names are
15in the list, allowing you to use them without parentheses
16even before they're declared.
17
18See L<perlmod/Pragmatic Modules> and L<strict/subs>.
19
20=cut
a0d0e21e
LW
21require 5.000;
22
a0d0e21e
LW
23sub import {
24 my $callpack = caller;
25 my $pack = shift;
26 my @imports = @_;
27 foreach $sym (@imports) {
28 *{"${callpack}::$sym"} = \&{"${callpack}::$sym"};
29 }
30};
31
321;