Simple implementation of ATEXIT for Perl 6