You want to parse
sub test_someting($tempdir) { # do some tests }
And because you see the (registered) keyword "tempdir" your test system is supposed to call this test with a prepared temporary directory?
ok( test_something( create_tempdir() ), "something", )
Kind of a naming convention?
Did I get it right?
If yes, I could think of some alternative (and more perlish) ways to achieve this without needing to parse the signature.
PS: not sure why you call this "dependency injection" or do you plan testruns where the injected $tempdir is not a temporary dir? :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^5: Introspecting function signatures
by LanX
in thread Introspecting function signatures
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |