Skip to content
Sections
>> Trisquel >> Pakete >> aramo >> perl >> libuniversal-require-perl
etiona  ] [  nabia  ] [  aramo  ]
[ Quellcode: libuniversal-require-perl  ]

Paket: libuniversal-require-perl (0.19-1)

Load modules from a variable (deprecated)

This works exactly like the standard require in Perl, except without the bareword restriction, and it does not die. Since require() is placed in the UNIVERSAL namespace, it will work on any module. You just have to use UNIVERSAL::require somewhere in your code.

If you have ever had to do this...

   eval "require $module";

to get around the bareword caveats on require(), this module is for you. It creates a universal require() class method that will work with every Perl module and it is secure. So instead of doing some arcane eval() work, you can do this:

   $module->require;

It does not save you much typing, but it will make a lot more sense to someone who is not a ninth level Perl acolyte.

Also provided is a use() method which works in a similar way.

NOTE that UNIVERSAL::require is considered deprecated by its author, who suggestest to look at a number of better suited and more actively maintained alternatives discussed in the POD's "SEE ALSO" section.

Andere Pakete mit Bezug zu libuniversal-require-perl

  • hängt ab von
  • empfiehlt
  • schlägt vor
  • dep: perl
    Larry Wall's Practical Extraction and Report Language

libuniversal-require-perl herunterladen

Download für alle verfügbaren Architekturen
Architektur Paketgröße Größe (installiert) Dateien
all 9,0 kB23 kB [Liste der Dateien]