Server IP : 104.21.38.3 / Your IP : 172.68.242.82 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/perl/5.34.0/ |
Upload File : |
package subs; use strict; use warnings; our $VERSION = '1.04'; =head1 NAME subs - Perl pragma to predeclare subroutine names =head1 SYNOPSIS use subs qw(frob); frob 3..10; =head1 DESCRIPTION This will predeclare all the subroutines whose names are in the list, allowing you to use them without parentheses (as list operators) even before they're declared. Unlike pragmas that affect the C<$^H> hints variable, the C<use vars> and C<use subs> declarations are not lexically scoped to the block they appear in: they affect the entire package in which they appear. It is not possible to rescind these declarations with C<no vars> or C<no subs>. See L<perlmodlib/Pragmatic Modules> and L<strict/strict subs>. =cut sub import { my $callpack = caller; my $pack = shift; my @imports = @_; foreach my $sym (@imports) { no strict 'refs'; *{"${callpack}::$sym"} = \&{"${callpack}::$sym"}; } }; 1;