Larry Wall ha scritto:
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.
mh.. this does seem to have issues cause the MAIN somehow overlap, maybe
because I'm loading other file through require ?
Anyway I didn't know about caller and it seems to work, so I just put
"unless caller" as the top of the block and everything is fine, thanks
everyone again :)