unmocked(3pm)

πŸ“¦
version 0.09 Β· 2 versions
  • 0.09 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.09 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ unmocked ✨

okay so bestie, the module name is literally unmocked and it does exactly one iconic thing: it lets you use real libraries from inside your mocked ones. that's it. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

so like, your fake lil mocked module is out here needing an actual real library, and you're like "help":

# Your mocked module needs to use a real library
package Fake::Fun;
use unmocked 'URI';

no cap, that's genuinely all you gotta type. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea πŸ“ β€” when you're out there mocking modules with mocked, you get this gorgeous guarantee that zero extra "real" libraries are getting loaded behind your back. very demure, very mindful. very safe.

but sometimes?? you do want to use real libraries from within your mocked library. the plot thickens. 😭

this module is your girl for that exact situation: it lets you load real libraries using your previous include paths. so the stuff mocked took away? it's still reachable if you ask nicely. periodt. πŸ‘‘


πŸ’– FUNCTIONS πŸ’–

🌈 import

hand it a package name and this function will make sure the module you specified gets loaded from the regular @INC path β€” y'know, the one that mocked.pm has removed. lowkey the whole point of this module. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Luke Closs, "<cpan at 5thplane.com>" β€” the icon who made this happen, we stan. 🌟


πŸŽ€ LICENSE πŸŽ€

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. fr fr, go wild, it's Perl-licensed. 🧚


and that's a wrap on unmocked from the User Contributed Perl Documentation, brought to you by perl v5.36.0, dated 2022-12-04 πŸ’œ thanks for coming to my ted talk, mwah 😘

πŸ“¦ where this page comes from