Test::Folder(3pm)
π Test::Folder β the vibe check for your folders π
okay so bestie, welcome to Test::Folder, a lil Perl module from the User Contributed Perl Documentation corner of the CPAN universe, and it does exactly one thing and does it gorgeously: it tests folder attributes. like, is it there? is it empty? can we even read it? all that. no cap. β¨
πΈ NAME πΈ
Test::Folder β test folder attributes π
π SYNOPSIS π
use Test::More ...;
use Test::Folder;
that's it. that's the whole setup. you bring Test::More, this module brings the folder drama. π¦
β¨ DESCRIPTION β¨
so this module is literally a collection of test utilities for folder attributes. it's not out here trying to be a whole framework, okay? it's the bestie that shows up with exactly the right snack at exactly the right moment. π
the way that you use it: team it up with Test::More inside your test programs. Test::More handles the "ok / not ok" energy, Test::Folder handles the "but is the FOLDER okay though" energy. iconic duo, honestly. π
π₯ FUNCTIONS π₯
every single one of these bad boys takes a FOLDERNAME and an optional TESTNAME, and every single one is giving the same "ok if⦠, not ok otherwise" structure. slay.
folder_exists_ok(FOLDERNAME [, TESTNAME] )β ok if the folder exists, and not ok otherwise. the classic. the moment. πfolder_not_exists_ok(FOLDERNAME [, TESTNAME] )β ok if the folder does not exist, and not ok otherwise. ghosting the filesystem, respectfully. π»folder_empty_ok(FOLDERNAME [, TESTNAME] )β ok if the folder is empty (contains no files or subfolders), and not ok otherwise. Marie Kondo vibes: does it spark joy, or does it spark clutter? β¨folder_not_empty_ok(FOLDERNAME [, TESTNAME] )β ok if the folder is not empty (contains any files or subfolders), and not ok otherwise. highkey the opposite of the last one, as the name suggests. πfolder_readable_ok(FOLDERNAME [, TESTNAME] )β ok if the folder is readable, and not ok otherwise. can we peek? permission check says yes. πfolder_not_readable_ok(FOLDERNAME [, TESTNAME] )β ok if the folder is not readable, and not ok otherwise. no peeking allowed, periodt. πfolder_writable_ok(FOLDERNAME [, TESTNAME] )β ok if the folder is writable, and not ok otherwise. can we drop files in here and run? oh we absolutely can. π₯folder_not_writable_ok(FOLDERNAME [, TESTNAME] )β ok if the folder is not writable, and not ok otherwise. locked down, hands off, we simply do not touch. πfolder_executable_ok(FOLDERNAME [, TESTNAME] )β ok if the folder is executable, and not ok otherwise. yes bestie, folders get the executable bit too, and yes it matters, iykyk. π§folder_not_executable_ok(FOLDERNAME [, TESTNAME] )β ok if the folder is not executable, and not ok otherwise. no walking through this door, babe. π
π TO DO π
there are probably some more folder attributes that can be tested. if you need them, please ask (or better yet, contribute code!). genuinely β the maintainer is asking nicely and the group chat is open. π«Ά
π AUTHOR π
Martin 'Kingpin' Thurn, "mthurn at cpan.org", <http://tinyurl.com/nn67z>.
go say hi, he built this whole thing. π
π¨ BUGS π¨
please report any bugs or feature requests to "bug-test-dir at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Dir>. i will be notified, and then you'll automatically be notified of progress on your bug as i make changes.
so basically you file it, and the updates come straight back to you. communication, we love to see it. π
π«Ά SUPPORT π«Ά
you can find documentation for this module with the perldoc command.
perldoc Test::Folder
you can also look for information at:
- RT: CPAN's request tracker β <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Dir>
- AnnoCPAN: Annotated CPAN documentation β <http://annocpan.org/dist/Test-Dir>
- CPAN Ratings β <http://cpanratings.perl.org/d/Test-Dir>
- Search CPAN β <http://search.cpan.org/dist/Test-Dir>
four whole places to lurk. pick your fave. β¨
π ACKNOWLEDGEMENTS π
bestie. this section is literally empty in the original. nothing in it. a blank canvas. we're just gonna sit here with it in respectful silence. π―οΈ
β COPYRIGHT & LICENSE β
Copyright (C) 2007-2008 Martin 'Kingpin' Thurn
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
free software, same terms as Perl itself, no cap. π
and that's the whole page, babe. πΈ this was Test::Folder(3pm) from perl v5.36.0, dated 2022-10-13. mwah, take care of your folders and they'll take care of you. π
β¨π
π¦ where this page comes from
- ubuntu noble: libtest-dir-perl 1.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtest-dir-perl 1.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtest-dir-perl 1.16-3 Β· 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