Run::Parts(3pm)
π Run::Parts β the Run::Parts(3pm) page, bestie edition π
okay so. this is Run::Parts(3pm), a User Contributed Perl Documentation page, and it's basically Debian's run-parts tool but, like, in Perl. she's giving β¨libraryβ¨, she's giving β¨automationβ¨, and honestly? obsessed.
πΈ NAME πΈ
Run::Parts β she offers the functionality of Debian's run-parts tool, but in Perl. no cap. π
β¨ VERSION β¨
version 0.09 π
π¦ SYNOPSIS π¦
Run::Parts offers functionality of Debian's run-parts(8) tool in Perl. periodt.
run-parts runs all the executable files named within constraints described in run-parts(8) and Run::Parts::Perl, found in the given directory. Other files and directories are silently ignored β they just get ghosted, no drama, no error. π
Additionally it can just print the names of all the matching files β and lowkey that's not limited to executables, but it does ignore blacklisted files like e.g. backup files β but it doesn't actually run them. so it's the "look but don't touch" mode. π
This is useful when functionality or configuration is split over multiple files in one directory. A typical convention is that the directory name ends in .d. Common examples for such split configuration directories, and honestly this list ate:
/etc/cron.d/
/etc/apt/apt.conf.d/
/etc/apt/sources.list.d/,
/etc/aptitude-robot/pkglist.d/
/etc/logrotate.d/
/etc/rsyslog.d/
Perhaps a little code snippet. π«Ά and yes, it's iconic:
use Run::Parts;
my $rp = Run::Parts->new('directory'); # chooses backend automatically
my $rpp = Run::Parts->new('directory', 'perl'); # pure perl backend
my $rpd = Run::Parts->new('directory', 'debian'); # uses /bin/run-parts
my @file_list = $rp->list;
my @executables_list = $rpp->test;
my $commands_output = $rpd->run;
...
π§ BACKENDS π§
Run::Parts contains two backend implementations. fr fr, two of them.
Run::Parts::Debianβ actually uses/bin/run-partsRun::Parts::Perlβ a pure Perl implementation of a basic set ofrun-parts(8)' functionality
heads up bestie:Run::Parts::Debianmay or may not work with RedHat's simplified shell-script based reimplementation of Debian'srun-parts(8). it's giving "results may vary". π
By default Run::Parts uses Run::Parts::Debian if /bin/run-parts exists, and Run::Parts::Perl otherwise. But you can also choose any of the backends explicitly β you're the main character, you decide. π
π METHODS π
π new (Constructor)
Creates a new Run::Parts object. Takes one parameter: the directory on which run-parts should work.
π run_parts_command
Returns the run-parts(8) command to run with the given command parameter.
π list
Lists all relevant files in the given directory. Equivalent to run-parts --list.
β test
Lists all relevant executables in the given directory. Equivalent to run-parts --test.
π₯ run
Runs all relevant executables in the given directory. Equivalent to run-parts.
πΈ concat
Returns the concatenated contents of all relevant files in the given directory. Equivalent to cat `run-parts --list`.
π SEE ALSO π
run-parts(8), Run::Parts::Debian, Run::Parts::Perl
π BUGS π
Please report any bugs or feature requests to bug-run-parts at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Run-Parts>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. so like, the communication is giving impeccable. π«Ά
π§ CODE π§
You can find a git repository of Run::Parts' code at <https://github.com/xtaran/run-parts>. go look, it's right there, it's slaying. β¨
π«Ά SUPPORT π«Ά
- RT: CPAN's request tracker (report bugs here) β <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Run-Parts>
- AnnoCPAN: Annotated CPAN documentation β <http://annocpan.org/dist/Run-Parts>
- CPAN Ratings β <http://cpanratings.perl.org/d/Run-Parts>
- Search CPAN β <http://search.cpan.org/dist/Run-Parts/>
π AUTHOR π
Axel Beckert <abe@deuxchevaux.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2021 by Axel Beckert.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, it's free, go wild, but respectfully. π
and that's the whole page bestie!! π this was perl v5.32.0, dated 2021-01-03, and that's Run::Parts(3pm) β thanks for reading, ily, go run some parts π¦β¨π
π¦ where this page comes from
- debian bookworm: librun-parts-perl 0.09-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: librun-parts-perl 0.09-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: librun-parts-perl 0.09-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librun-parts-perl 0.09-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librun-parts-perl 0.09-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librun-parts-perl 0.09-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms