AutoLoader(3pm)

πŸ“¦
version 0.03 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ AutoLoader(3pm) ✨ β€” no wait, it's giving Test::AutoLoader πŸ’…

okay bestie, buckle up, because this page is filed under the name AutoLoader (3pm) but what you're actually getting is the manual for Test::AutoLoader. yes it's confusing. no it's not my fault. we move. 🫢


🌸 NAME 🌸

Test::AutoLoader β€” a testing utility for autosplit/autoloaded modules. that's it, that's the whole vibe. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

use Test::AutoLoader;
use Test::More tests => 3;

use_ok("My::Module"); # from Test::More
autoload_ok("My::Module","mysub","sub_two); # test only the listed subs
autoload_ok("My::Module"); # tests all '.al' files found for the module

look at her go. so simple. so clean. 🌈


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this single-purpose module has ONE job and she's doing it: trying to eliminate uncaught syntax errors or other obvious goofs hiding in subroutines that are autosplit. because here's the tea β˜• β€” those subs are not looked at by perl -c Module.pm. they're just out there, unchecked, living their lives. πŸ’€

the dream? the dream is that this module becomes unnecessary once you reach full coverage of those subroutines in your unit tests. until that happy day, though, this is your quick and dirty backstop for embarrassing typos. we've all been there. πŸ™ˆ

Test::AutoLoader is built on Test::Builder, and it should interoperate smoothly with other modules of that same kind (e.g. Test::Simple, Test::More). friendship bracelet energy. 🫢


πŸ’œ EXPORT πŸ’œ

⭐ autoload_ok ⭐

very much like the use_ok subroutine (peep Test::More for that one, iykyk).

here's how she moves:

  • pass her only a module name and she'll find all subroutine definitions in the auto directory and attempt to compile them. go off, queen. πŸ‘‘
  • pass her a list of subroutine names and she'll look for and attempt to compile those (and only those). no extras, no surprise guests. πŸ’…

any files that cannot be found (if you specified them directly), read, and compiled will be listed in the diagnostic output for the failed test. so like, she's not gonna leave you guessing. 😭✨


🌟 AUTHOR 🌟

Ben Warfield (ben_warfield@nrgn.com) β€” shoutout to the icon who made this. πŸ’–


this module is copyright (c) 2005 Neurogen Corporation, Branford, Connecticut, USA. πŸ‡ΊπŸ‡Έ

it may be distributed under the terms of the GNU General Public License. periodt. πŸ’…


🌈 SEE ALSO 🌈

  • perl
  • Test::More
  • AutoLoader

okay bestie that's the whole page, no cap, every single line accounted for, nothing skipped, nothing invented, we ate and left no crumbs. πŸ“

final sign-off: this page is from perl v5.34.0, dated 2022-06-17, and it lives under the AutoLoader(3pm) manual. love her, cherish her, go compile some autosplit subs. bye babes!! πŸ¦‹βœ¨πŸ’–