Touchable.pm is not yet published, but perlmonks deserves a preview
Just by including this incredibly simple module
you can prevent unwanted access to
your perl programs and
protect your compiled application from
unintended double clicks. Here the code and example usage
#!/usr/bin/perl use strict; use warnings; package Touchable; exit 0 unless (stat ($0))[9] && (($^T - (stat ($0))[9] ) < 3);

Example of usage:
# consuming script: yourprogram.pl use strict; use warnings; use Touchable; print "here $0\n"; # usage example perl yourprogram.pl # works only if touch activated.. touch yourprogram.pl & perl yourprogram.pl here yourprogram.pl

Have a nice 1st of April!

Have fun!

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re: Activate your perl programs by touch with Touchable.pm!
by ww (Archbishop) on Apr 01, 2016 at 10:21 UTC
Re: Activate your perl programs by touch with Touchable.pm!
by FreeBeerReekingMonk (Deacon) on Apr 01, 2016 at 19:32 UTC
    Aha... so the perl script touches itself? Isn't that kind of dirty? Does an untaint() function exist to make it less dirty?