File::...Notify(3pm)
π NAME π
File::ChangeNotify β watch for changes to files, cross-platform style, bestie β¨
Oh and btw this page lives in the User Contributed Perl Documentation section, section 3pm, which is the whole reason the header is like that. iykyk π
πΈ VERSION πΈ
version 0.31 β she's grown, she's thriving π
π¦ SYNOPSIS π¦
okay so here's the vibe:
use File::ChangeNotify;
my $watcher =
File::ChangeNotify->instantiate_watcher
( directories => [ '/my/path', '/my/other' ],
filter => qr/\.(?:pm|conf|yml)$/,
);
if ( my @events = $watcher->new_events ) { ... }
# blocking
while ( my @events = $watcher->wait_for_events ) { ... }
literally two ways to do the thing: peek at what's new with new_events, or just sit there and wait for stuff to happen with wait_for_events. the second one blocks. she will simply Not move until something changes. main character energy honestly π
β¨ DESCRIPTION β¨
so what this module does is hand you an API for building a File::ChangeNotify::Watcher subclass that actually works on your platform. cross-platform? yes ma'am. no cap. π
pro tip from me to you: most of the actual documentation for this distro is over in File::ChangeNotify::Watcher. this page is the lil intro, that page is the whole story. don't come for me, go read it π«Ά
π METHODS π
this class provides the following methods, and yes, they're both cute:
π File::ChangeNotify->instantiate_watcher(...)
this method goes shopping through every available subclass of File::ChangeNotify::Watcher and instantiates the first one it can load, using the arguments you handed it. obsessed with the efficiency.
and here's the little quirk that makes her iconic: it always tries File::ChangeNotify::Watcher::Default last, because the assumption is that any other class that's available is a better option. so Default is literally the last-resort friend you text at 2am. sorry babe, it's true π
π File::ChangeNotify->usable_classes
returns a list of all the loadable File::ChangeNotify::Watcher subclasses β except File::ChangeNotify::Watcher::Default, which gets left off the list because she is always usable. she's the baseline. the blueprint. the moment. π
π SUPPORT π
got bugs? (not the cute kind π) you can submit them at:
http://rt.cpan.org/Public/Dist/Display.html?Name=File-ChangeNotify
or email them over to bug-file-changenotify@rt.cpan.org β like, mailto:bug-file-changenotify@rt.cpan.org if you're fancy.
also!! the author is usually active on IRC as 'autarch' on irc://irc.perl.org. come say hi fr fr π«Ά
β SOURCE β
the source code repository for File-ChangeNotify lives at:
https://github.com/houseabsolute/File-ChangeNotify
go peek, go star it, go be nosy. that's the whole point of this module anyway π
π DONATIONS π
okay so if you'd like to thank the author for the work done on this module, please consider making a "donation" via PayPal. he spends a lot of free time creating free software and would appreciate any support you'd care to offer. π₯Ί
but also, please note: he is not suggesting that you must do this in order for him to continue working on this particular software. he will continue to do so, inasmuch as he has in the past, for as long as it interests him. periodt.
similarly β and this is important β a donation made this way will probably not make him work on this software much more, unless he gets so many donations that he can consider working on free software full time. (let's all have a chuckle at that together π)
to donate: log into PayPal and send money to autarch@urth.org, or use the button at http://www.urth.org/~autarch/fs-donation.html.
π AUTHOR π
Dave Rolsky <autarch@urth.org>
π§ CONTRIBUTORS π§
- Aaron Crane
<arc@cpan.org> - H. Merijn Branch
<h.m.brand@xs4all.nl> - Karen Etheridge
<ether@cpan.org>
absolute icons, all three of them π
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2009 - 2019 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
The full text of the license can be found in the LICENSE file included with this distribution. go read it bestie, it's good for you π
and that's the whole page!! mwah π
this lil beauty is from perl v5.36.0, dated 2022-12-04, and yes she's a File::...Notify(3pm) page β k bye, go watch some files change π¦β¨
π¦ where this page comes from
- debian bookworm: libfile-changenotify-perl 0.31-2 Β· Artistic-2.0
- debian trixie: libfile-changenotify-perl 0.31-2 Β· Artistic-2.0
- ubuntu noble: libfile-changenotify-perl 0.31-2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms