On Fri, Jan 05, 2007 at 01:40:44PM +0200, Gaal Yahas wrote: : > I think it should be possible and nice to use a macro (possibly a : > standard subroutine, I'm not sure) like : > : > testing { : > ok foo; : > } : > : > would it make sense or I'm just crazy? : : I like the approach.
I think you eventually just want: sub MAIN { use Test; ok foo; } but the autocall into MAIN is not yet implemented. You can emulate by putting something like this as the last line in your file: MAIN(@ARGS), exit if $?FILE eq $*PROGRAM_NAME; or maybe MAIN(@ARGS), exit unless caller; if/when that works as in Perl 5. When the autocall is implemented you can just delete that line. Larry