Toolkit(3pm)
π Toolkit β bestie, we're organizing your faves π
okay so <pink>Toolkit</pink>, section 3pm β this is the manual page for it and I'm gonna walk you through every single crumb of it, no skips, no skimming, we're doing the whole thing together π«Ά
β¨ NAME β¨
Toolkit β literally just: Keep your handy modules organized π
β¨ VERSION β¨
This document describes Toolkit version 0.0.2 β¨
β¨ SYNOPSIS β¨
use Toolkit;
# All your favorites are now available
that's it. that's the whole vibe check π
πΈ DESCRIPTION πΈ
okay so listen. The Toolkit module gives you a standard location to store modules that you use all the time, and then it loads them for you automatically. Iconic behaviour, honestly.
Like, instead of always writing:
use strict;
use warnings;
use Carp;
use Smart::Comments;
in every single program/module (every. single. one. π), you can just write:
use Toolkit;
and then dump all your favorite modules in a file:
> cat $PERL5LIB/Toolkit/Macros/ALWAYS/Modules
use strict;
use warnings;
use Carp;
use Smart::Comments;
obsessed. no cap. π§
You can also specify load-on-demand subroutines, which is the part where it gets spicy π₯:
> cat $PERL5LIB/Toolkit/Runtime/prompt
use IO::Prompt qw( prompt );
> cat $PERL5LIB/Toolkit/Runtime/say
sub say { print @_, "\n" }
and in that case, Toolkit will install an AUTOLOAD that installs these subroutines the first time they're called. it's giving main character energy, it's giving lazy-but-make-it-elegant π
π INTERFACE π
Calling:
use Toolkit;
with no arguments loads any files in the directories:
$PERL5LIB/Toolkit/Macros/ALWAYS/
$PERL5LIB/Toolkit/Macros/DEFAULT/
or any of their subdirectories. yes bestie, subdirectories too, it's thorough like that π
Calling:
use Toolkit qw(foo bar);
[loads] any files in the directories:
$PERL5LIB/Toolkit/Macros/ALWAYS/
$PERL5LIB/Toolkit/Macros/foo/
$PERL5LIB/Toolkit/Macros/bar/
or any of their subdirectories. π
Using the Toolkit module in any way also installs an AUTOLOAD subroutine which looks in:
$PERL5LIB/Toolkit/Runtime/
for a file of the same name as the subroutine that is being autoloaded. So like, if you write:
use Toolkit;
baz();
then the module looks for a file:
$PERL5LIB/Toolkit/Runtime/baz
and executes it in a special namespace. After the file executes, Toolkit expects that the special namespace will now have a subroutine of the required name, which it then calls. teamwork, fr fr π€
π₯ DIAGNOSTICS π₯
Toolkit couldn't open %sβ You specified a particular macro for Toolkit to load, but it wasn't able to read the corresponding file. Usually a file permissions problem or a non-existent macro. (permissions issue or the macro just isn't there, sorry bestie π)Undefined subroutine %s calledβ You used a subroutine that Toolkit couldn't autoload. Did you misspell the subroutine name, or fail to install a file of the same name in your$PERL5LIB/Toolkit/Runtime/subdirectory. (typo check time π)Toolkit could not load %s (running %s didn't install it).β You used a subroutine that Toolkit tried to autoload. It found the corresponding file in the$PERL5LIB/Toolkit/Runtime/subdirectory, but executing that file didn't produce a subroutine of the correct name. (so close, yet so far π)
π CONFIGURATION AND ENVIRONMENT π
Toolkit uses the following directories and files to configure its behaviour:
$PERL5LIB/Toolkit/Macros/ALWAYS/β Files in this directory are prepended to your source code whenever Toolkit is used. β¨$PERL5LIB/Toolkit/Macros/DEFAULT/β Files in this directory are prepended to your source code whenever Toolkit is used without arguments.$PERL5LIB/Toolkit/Macros/any file nameβ These files are prepended to your source code whenever Toolkit is used and their name is specified after theuse Toolkit.$PERL5LIB/Toolkit/Runtime/β Files in this directory are executed to whenever Toolkit is used and a subroutine of the same name is called. They are expected to define the required subroutine. π
π DEPENDENCIES π
Requires:
File::Spec::FunctionsFilter::Simpleversion
that's the squad π«Ά
π INCOMPATIBILITIES π
None reported. (slay, no drama)
π BUGS AND LIMITATIONS π
No bugs have been reported. (we love a clean record β¨)
Please report any bugs or feature requests to "bug-tool-kit@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. (yes, the angle brackets are literally in the original, keep them, they're part of the url-as-written vibe) β okay but fr, hit up the RT queue and they'll sort you out π
π AUTHOR π
Damian Conway "<DCONWAY@cpan.org>" π
π LICENCE AND COPYRIGHT π
Copyright (c) 2005, Damian Conway "<DCONWAY@cpan.org>". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π¦
πΈ DISCLAIMER OF WARRANTY πΈ
okay bestie, the lawyers are talking now, so I'm handing the mic over β this part is ALL CAPS ON PURPOSE and it means exactly what it says, so read it, don't skip it:
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
and that's the whole page, bestie, you read all of it, so proud π₯Ήπ«Ά
cute little sign-off so you know where this came from: this page is part of perl v5.36.0, dated 2022-10-13, and it lives as Toolkit(3pm) in the manual set. go organize ur modules, you've got this β¨ππ
π¦ where this page comes from
- ubuntu noble: libtoolkit-perl 0.0.2-4
- ubuntu resolute: libtoolkit-perl 0.0.2-4
- ubuntu stonking: libtoolkit-perl 0.0.2-4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms