New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should Perl 6 run MAIN if the file is required? #5826
Comments
From @briandfoyHere's a short Perl 6 program that declare a `MAIN` subroutine. I $ cat main.pm6 And I see output when I execute the program directly: $ perl6 main.pm6 If I load it as a module, I see no output: $ perl6 -I. -Mmain -e "say 'Hey'" Same if I `use` it from inside the program, I see no output: $ perl6 -I. -e 'use main' But, if I use `require`, I get output: $ perl6 -I. -e 'require <main.pm6>' [Synopsis 06](http://design.perl6.org/S06.html#Declaring_a_MAIN_subroutine) I get the same behaviour with Rakudo Star 2016.07 and 2016.10. I realize that the Synopses are dated. Absent anything else noting MAIN is very lightly documented in Language/functions.pod6. The Also asked on Stackoverflow: http://stackoverflow.com/q/40778852/2766176 |
From @lizmatFWIW, this indeed feels as a bug to me
|
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Sun, 27 Nov 2016 02:39:29 -0800, elizabeth wrote:
To me also. We may also want to consider what happens with `EVAL` and `EVALFILE`, while we get this nailed down. /jnthn |
Migrated from rt.perl.org#130185 (status was 'open')
Searchable as RT130185$
The text was updated successfully, but these errors were encountered: