sub pay_attention { die 'void context' if ! defined wantarray; return rand; } sub side_effect { print "I am happy.\n"; return; } sub wait_for_destruction { return OnDestroyDo->new( \&side_effect ); }