The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Devel::Declare -

SYNOPSIS

Look at the tests. This module is currently on CPAN to ease smoke testing and allow early adopters who've been involved in the design to experiment with it.

DESCRIPTION

import

use Devel::Declare qw(list of subs);

Calls Devel::Declare->setup_for(__PACKAGE__ => \@list_of_subs);

unimport

no Devel::Declare;

Calls Devel::Declare->teardown_for(__PACKAGE__);

setup_for

Devel::Declare->setup_for($package => \@subnames);

Installs declarator magic (unless already installed) and registers "${package}::$name" for each member of @subnames

teardown_for

Devel::Declare->teardown_for($package);

Deregisters all subs currently registered for $package and uninstalls declarator magic if number of teardown_for calls matches number of setup_for calls.

AUTHOR

Matt S Trout - <mst@shadowcat.co.uk>

Company: http://www.shadowcat.co.uk/ Blog: http://chainsawblues.vox.com/

LICENSE

This library is free software under the same terms as perl itself