home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
perl-5.003-bin.lha
/
lib
/
perl5
/
subs.pm
< prev
next >
Wrap
Text File
|
1996-10-09
|
548b
|
33 lines
package subs;
=head1 NAME
subs - Perl pragma to predeclare sub names
=head1 SYNOPSIS
use subs qw(frob);
frob 3..10;
=head1 DESCRIPTION
This will predeclare all the subroutine whose names are
in the list, allowing you to use them without parentheses
even before they're declared.
See L<perlmod/Pragmatic Modules> and L<strict/subs>.
=cut
require 5.000;
sub import {
my $callpack = caller;
my $pack = shift;
my @imports = @_;
foreach $sym (@imports) {
*{"${callpack}::$sym"} = \&{"${callpack}::$sym"};
}
};
1;