The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

adblock_timeout.pl - Sample script using App::DNS::Adblock

SYNOPSIS

sudo nohup perl adblock_timeout.pl &

DESCRIPTION

This script implements a DNS-based ad blocker. Intended for use as a persistent process, execution is wrapped in a timeout function for the purpose of refreshing the adblock stack.

CAVEATS

Tested on darwin only, using launchctl to handle persistence.

app.dns.adblock_timeout.plist:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>app.dns.adblock_timeout</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/adblock_timeout.pl</string> </array> <key>KeepAlive</key> <true/> <key>RunAtLoad</key> <true/> </dict> </plist>

AUTHOR

David Watson <dwatson@cpan.org>

SEE ALSO

App::DNS::Adblock

COPYRIGHT

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.