Util-SelfDestruct
view release on metacpan or search on metacpan
lib/Util/SelfDestruct.pm view on Meta::CPAN
# vim:ts=4:sw=4:tw=78
BEGIN {
use strict;
use Carp qw(cluck croak);
use Cwd qw(abs_path);
use Fcntl qw(:DEFAULT :flock);
use constant DEBUG => $ENV{'DEBUG'} ? 1 : 0;
use constant PROGRAM_NAME => -e abs_path($0) ? abs_path($0) : undef;
use constant HOME => -d (getpwuid($>))[7] ? (getpwuid($>))[7] : $ENV{HOME};
use constant RC_FILE => HOME.'/.selfdestruct';
use vars qw($VERSION $PARAM);
$VERSION = '1.21' || sprintf('%d.%02d', q$Revision$ =~ /(\d+)/g);
$PARAM = {};
}
END {
if (my ($action,$context) = _whatActionToTake($PARAM)) {
if ($action eq 'unlink' && !exists $PARAM->{ABORT}) {
( run in 0.268 second using v1.01-cache-2.11-cpan-8d75d55dd25 )