| 1 |
Source: libuniversal-require-perl |
| 2 |
Maintainer: Debian Perl Group <[email protected]> |
| 3 |
Uploaders: gregor herrmann <[email protected]>, |
| 4 |
Florian Schlichting <[email protected]> |
| 5 |
Section: perl |
| 6 |
Testsuite: autopkgtest-pkg-perl |
| 7 |
Priority: optional |
| 8 |
Build-Depends: debhelper-compat (= 13) |
| 9 |
Build-Depends-Indep: perl |
| 10 |
Standards-Version: 4.6.1 |
| 11 |
Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libuniversal-require-perl |
| 12 |
Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libuniversal-require-perl.git |
| 13 |
Homepage: https://metacpan.org/release/UNIVERSAL-require |
| 14 |
Rules-Requires-Root: no |
| 15 |
|
| 16 |
Package: libuniversal-require-perl |
| 17 |
Architecture: all |
| 18 |
Depends: ${misc:Depends}, |
| 19 |
${perl:Depends} |
| 20 |
Replaces: libuniversal-exports-perl |
| 21 |
Multi-Arch: foreign |
| 22 |
Description: Load modules from a variable (deprecated) |
| 23 |
This works exactly like the standard require in Perl, except without |
| 24 |
the bareword restriction, and it does not die. Since require() is |
| 25 |
placed in the UNIVERSAL namespace, it will work on any module. You |
| 26 |
just have to use UNIVERSAL::require somewhere in your code. |
| 27 |
. |
| 28 |
If you have ever had to do this... |
| 29 |
. |
| 30 |
eval "require $module"; |
| 31 |
. |
| 32 |
to get around the bareword caveats on require(), this module is for |
| 33 |
you. It creates a universal require() class method that will work |
| 34 |
with every Perl module and it is secure. So instead of doing some |
| 35 |
arcane eval() work, you can do this: |
| 36 |
. |
| 37 |
$module->require; |
| 38 |
. |
| 39 |
It does not save you much typing, but it will make a lot more sense |
| 40 |
to someone who is not a ninth level Perl acolyte. |
| 41 |
. |
| 42 |
Also provided is a use() method which works in a similar way. |
| 43 |
. |
| 44 |
NOTE that UNIVERSAL::require is considered deprecated by its author, who |
| 45 |
suggestest to look at a number of better suited and more actively maintained |
| 46 |
alternatives discussed in the POD's "SEE ALSO" section. |