Export...toClean(3pm)

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

πŸ’– Exporter...toClean(3pm) πŸ’–

okay bestie, come closer, this is the User Contributed Perl Documentation page for Exporter::AutoClean and it's lowkey genius, ngl.


✨ NAME ✨

Exporter::AutoClean β€” it exports instant functions that are only available at compile time. Like, they show up, do their lil job, and then vanish. Main character behaviour fr fr. πŸ’…


🌸 SYNOPSIS 🌸

use Exporter::AutoClean;

sub import {
    my $caller = caller;
    Exporter::AutoClean->export( $caller, sub_name => sub { # code... } );
}

see how clean that is?? obsessed. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

So basically? This is a simple wrapper module of B::Hooks::EndOfScope. It lets you export instant functions that are only available at compile time. That's it, that's the whole vibe. πŸŽ€


⭐ SEE ALSO ⭐

  • B::Hooks::EndOfScope
  • namespace::autoclean

go read those too bestie, iykyk πŸ’œ


πŸ‘‘ METHOD πŸ‘‘

Exporter::AutoClean->export( $package, %export_functions );

Exporter::AutoClean->export(
    $caller,
    function_name1 => sub { # code },
    function_name2 => \&code,
    :
);

It exports the instant functions described in %export_functions to $package. 🫢

And then β€” plot twist β€” these functions are automatically removed once compile time is done. gone. poof. no cap. 😭✨

πŸ’– AUTHOR πŸ’–

Daisuke Murase <typester@cpan.org>


Copyright (c) 2009 by KAYAC Inc.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πŸ“

The full text of the license can be found in the LICENSE file included with this module.


and that's the whole page bestie!! this one came from perl v5.34.0, dated 2022-06-16, and the manual name was folded in right up top like a lil bow πŸŽ€ β€” slay, go export something βœ¨πŸ’…

πŸ“¦ where this page comes from