Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[6.d] Document $*ARGFILES being fed by $*IN inside MAIN
Even when @*ARGS has stuff up in it.
Rakudo impl: rakudo/rakudo@84d45f07fb
Propspec:    Raku/roast@88499ac366
  • Loading branch information
zoffixznet committed Jul 29, 2018
1 parent 342466f commit eb0c969
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc/Language/variables.pod6
Expand Up @@ -1169,6 +1169,10 @@ that uses C<@*ARGS> as source files, if it contains any files, or C<$*IN>
otherwise. When C<$*IN> is used, its C<:nl-in>, C<:chomp>, C<:encoding>, and
C<:bin> will be set on the L<IO::ArgFiles> object.
As of 6.d language, C<$*ARGFILES> I<inside>
L<C«sub MAIN»|/language/functions#sub_MAIN> is always set to C<$*IN>, even
when C<@*ARGS> is not empty.
=item C<@*ARGS>
Arguments from the command line.
Expand Down
7 changes: 6 additions & 1 deletion doc/Type/IO/ArgFiles.pod6
Expand Up @@ -15,7 +15,8 @@ All the functionality is inherited from L<IO::CatHandle>.
This class is the magic behind the C<$*ARGFILES> variable. This variable
provides a way to iterate over files passed in to the program on the command
line. Thus the examples above can be simplified like so:
line (i.e. elements of L<C«@*ARGS»|/language/variables#index-entry-%40%2AARGS>).
Thus the examples above can be simplified like so:
use v6.c;
Expand Down Expand Up @@ -45,6 +46,10 @@ will then give the output
=for code :skip-test
Shall I compare thee to a summer's day?
As of 6.d language, C<$*ARGFILES> I<inside>
L<C«sub MAIN»|/language/functions#sub_MAIN> is always set to C<$*IN>, even
when C<@*ARGS> is not empty.
=end pod

# vim: expandtab shiftwidth=4 ft=perl6

0 comments on commit eb0c969

Please sign in to comment.