sub test_someting($tempdir) { # do some tests } #### ok( test_something( create_tempdir() ), "something", )