Skip to content

Commit

Permalink
Initial implementation with one simple test.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Jun 2, 2013
1 parent fa81aac commit f51f3f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Phaser/ATEXIT.pm
@@ -0,0 +1,7 @@
module Phaser {
sub ATEXIT(&code) is export {
state @blocks;
@blocks.push(&code);
END { for @blocks.reverse -> &code { &code() } }
}
}
6 changes: 6 additions & 0 deletions t/01.t
@@ -0,0 +1,6 @@
use Phaser::ATEXIT;
use Test;

ATEXIT { done }
ATEXIT { ok True, "Run at exit" }
ok True, "We are here!";

0 comments on commit f51f3f8

Please sign in to comment.