This is probably a stupid question, but I can't find anything from
google:
Does Perl6 support multiline comments?
Alfie John
Yes, in the form of pod blocks.
=begin comment
=end comment
They nest, too.
Luke
> Briefly, No and kind of.
>
> Standard Perl 6 comments are just like those in Perl 5. A '#'
> starts a comment that is terminated by the end of line. But, both
> Perl 5 and 6 are intended to support the POD system of embedded
> documentation (for the 'kind of'.) Of course the grammar is planed
> to be dynamically modifiable so a Perl module could theoriticaly
> declare it own special multi-line comment system.
>
> --
> ma...@biggar.org
> mark.a...@comcast.net
>
So, my question now is will the Perl6 perldoc be extended to allow
filters to be run so that these "theoretical multi-line comment
systems" will be run before spitting out to STDOUT?
Alfie
But does that then break my lovely formatted pod like it does in Perl5?
Alfie
Briefly, No and kind of.
Try this:
% cat > dosomething.pl
=head1 TITLE
Thingy - do something
=head1 DESCRIPTION
=over
=item * do_something()
does something
=cut
=begin comment
Commented out code.
=end comment
=cut
=item * do_something_else()
does something different from C<do_something>.
=back
=cut
^D
% perldoc dosomething.pl
# note the lack of the string "Commented out code"
So it worked in Perl 5, too. It was just kind of a pain because you
had to put a "=cut" after the "=end", and because you had to put
paragraph spaces between everything. We're getting rid of both of
those restrictions.
Luke
All incarnations of Perl have allowed us to begin multiple subsequent
lines with the comment glyph '#'. I am sure Perl 6 will not break this
tradition.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Excellent! That's what was really bugging me. I'm really glad that is
changing :)
Thanks,
Alfie