/usr/share/doc/libpoet-perl/examples/blog/bin/purge_old_entries.pl is in libpoet-perl 0.16-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 | #!/usr/bin/perl
use Poet::Script qw($conf);
use Blog::Article;
use strict;
use warnings;
my $days_to_keep = $conf->get( 'blog.days_to_keep' => 365 );
my $min_date = DateTime->now->subtract( days => $days_to_keep );
Blog::Article::Manager->delete_articles(
where => [ create_time => { lt => $min_date } ] );
|