<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package subs;

our $VERSION = '1.00';

=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.

Unlike pragmas that affect the C&lt;$^H&gt; hints variable, the C&lt;use vars&gt; and
C&lt;use subs&gt; declarations are not BLOCK-scoped.  They are thus effective
for the entire file in which they appear.  You may not rescind such
declarations with C&lt;no vars&gt; or C&lt;no subs&gt;.

See L&lt;perlmodlib/Pragmatic Modules&gt; and L&lt;strict/strict subs&gt;.

=cut

require 5.000;

sub import {
    my $callpack = caller;
    my $pack = shift;
    my @imports = @_;
    foreach $sym (@imports) {
	*{"${callpack}::$sym"} = \&amp;{"${callpack}::$sym"};
    }
};

1;
</pre></body></html>