diff options
Diffstat (limited to 'lib/PublicInbox/LeiLsWatch.pm')
-rw-r--r-- | lib/PublicInbox/LeiLsWatch.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiLsWatch.pm b/lib/PublicInbox/LeiLsWatch.pm new file mode 100644 index 00000000..f96dc4ec --- /dev/null +++ b/lib/PublicInbox/LeiLsWatch.pm @@ -0,0 +1,15 @@ +# Copyright all contributors <meta@public-inbox.org> +# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> + +package PublicInbox::LeiLsWatch; +use strict; +use v5.10.1; + +sub lei_ls_watch { + my ($lei) = @_; + my $cfg = $lei->_lei_cfg or return; + my @w = (join("\n", keys %$cfg) =~ m/^watch\.(.+?)\.state$/sgm); + $lei->puts(join("\n", @w)) if @w; +} + +1; |