Paranoid::Module(3pm)

πŸ“¦
version 2.10 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Paranoid::Module πŸ’–

okay bestie, welcome to Paranoid::Module β€” that's the User Contributed Perl Documentation section of the manual, page Paranoid::Module(3pm). it's giving "load stuff at runtime but make it ✨fancy✨". let's get into it πŸ’…


✨ NAME ✨

Paranoid::Module β€” Paranoid Module Loading Routines πŸŽ€

🌸 VERSION 🌸

no cap, here's the version string, verbatim, do not touch:

$Id: lib/Paranoid/Module.pm, 2.10 2022/03/08 00:01:04 acorliss $

πŸ¦‹ SYNOPSIS πŸ¦‹

the vibe, in code:

use Paranoid::Module;

$rv = loadModule($module, qw(:all));

πŸ’œ DESCRIPTION πŸ’œ

so basically this module gives you one single function and it's a whole baddie: it lets you do dynamic loading of modules at runtime, and it also handles importing the exported symbol table for you 🫢. you can ask for specific functions and/or tag sets, exactly the way you would in a normal use or import statement. periodt.

πŸ“ IMPORT LISTS πŸ“

by default, this module exports this symbol, like, automatically:

loadModule

and there are also these specialized import lists, in case you want the deluxe edition:

List        Members
--------------------------------------------------------
all         @defaults

πŸ‘‘ SUBROUTINES/METHODS πŸ‘‘

πŸ’… loadModule

$rv = loadModule($module, qw(:all));

it takes a module name, plus an optional list of arguments to feed to the import function. it hands you back a true or false depending on whether the require actually succeeded. simple. iconic. slay.

🌈 DEPENDENCIES 🌈

the squad it needs to show up:

  • Carp
  • Paranoid
  • Paranoid::Debug
  • Paranoid::Input

πŸ’€ BUGS AND LIMITATIONS πŸ’€

ok real talk, listen up, this part matters:

loadModule can not be used to require external files. it can only load modules that live in the existing library path. so like, don't try it, bestie, it's not that girl 😭

and also: even though it tracks what symbol sets (if any) got imported into the caller's namespace, the return value does not reflect the value of the import method. and that's intentional β€” because not every module out there has a properly coded import function, and some just inherit it from Exporter(3). so the return value from import is ignored. fr fr, it's a design choice, not a bug.

🧚 AUTHOR 🧚

Arthur Corliss (corliss@digitalmages.com)

this software is free software. similar to Perl, you can redistribute it and/or modify it under the terms of either:

  1. the GNU General Public License <https://www.gnu.org/licenses/gpl-1.0.html> as published by the Free Software Foundation <http://www.fsf.org/>; either version 1 <https://www.gnu.org/licenses/gpl-1.0.html>, or any later version <https://www.gnu.org/licenses/license-list.html#GNUGPL>, or
  2. the Artistic License 2.0 <https://opensource.org/licenses/Artistic-2.0>,

subject to the following additional term: no trademark rights to "Paranoid" have been or are conveyed under any of the above licenses. however, "Paranoid" may be used fairly to describe this unmodified software, in good faith, but not as a trademark.

(c) 2005 - 2020, Arthur Corliss (corliss@digitalmages.com) (tm) 2008 - 2020, Paranoid Inc. (www.paranoid.com)


and that's the whole page, bestie πŸ₯Ή this was Paranoid::Module(3pm) from the perl v5.38.2 docs, dated 2024-03-07. go forth and loadModule responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from