Class::Unload(3)

πŸ’– NAME πŸ’–

Okay so welcome to the Class::Unload(3) page, brought to you by the User Contributed Perl Documentation girlies. This module is literally called Class::Unload, and its whole entire job is: unload a class. That’s the vibe. ✨

πŸŽ€ VERSION πŸŽ€

Version 0.12, bestie β€” noted, screenshot, pinned. πŸ’…

🌈 SYNOPSIS 🌈

Here’s the little demo, exactly as it appears, no cap:

use Class::Unload;
use Class::Inspector;

use Some::Class;

Class::Unload->unload( 'Some::Class' );
Class::Inspector->loaded( 'Some::Class' ); # Returns false

require Some::Class; # Reloads the class

πŸ¦‹ METHODS πŸ¦‹

unload $class

This method unloads the given class by clearing out its symbol table and removing it from %INC. If it’s a Moose class, the metaclass is also removed. That’s the whole move, periodt. πŸ‘‘

🌸 SEE ALSO 🌸

  • Class::Inspector β€” yes, go look at this one too, bestie.

🫢 ACKNOWLEDGEMENTS 🫢

Big thank-yous to Matt S. Trout, James Mastros, and Uri Guttman for various tips and pointers. Y’all ate. πŸ’–

πŸ‘‘ AUTHOR πŸ‘‘

Written by Dagfinn Ilmari MannsΓ₯ker <ilmari@ilmari.org>; β€” icon behavior, honestly.

This software is copyright (c) 2025 by Dagfinn Ilmari MannsΓ₯ker.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. 🫢


This iconic little page is from perl v5.40.2, dated 2026-01-17, and it’s Class::Unload(3) β€” bye bestie! πŸ’–βœ¨

πŸ“¦ where this page comes from