more useful options | |
PerlMonks |
in reply to Re^7: Introspecting function signatures
in thread Introspecting function signatures
So many things which are just blocks in Perl become named functions there, even lamda is useless for that.
But no need to copy their limitations.
My suggestion would be to apply attributes or explicit use
sub :test something { my :TEMPDIR $tempdir = shift; # or my :FIXTURE $tempdir = shift; # or use fixture qw/$tempdir/; #... }
This offers plenty of possibilities at compile time and is more flexible than Python's approach.
and I'd certainly put test-subs into their own package, if they lived in the same file.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^9: Introspecting function signatures
by jcb (Parson) on Mar 08, 2021 at 01:58 UTC |