Skip to content

Commit

Permalink
Document "use isms <Perl5>"
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jun 8, 2018
1 parent b88200e commit c188d79
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions doc/Language/pragmas.pod6
Expand Up @@ -78,6 +78,28 @@ C<fatal> pragma is enabled by default, and you can I<disable> it with C<no fatal
=item B<invocant> [NYI]
=item X<B<isms>|isms> [2018.06 and later]
Allow for some other language constructs that were deemed to be a trap that
warranted a warning and/or an error in normal Perl 6 programming. Currently,
only C<Perl5> is allowed, which disables a bunch of P5isms warnings and errors.
sub abs() { say "foo" }
abs;
# Unsupported use of bare "abs"; in Perl 6 please use .abs if you meant
# to call it as a method on $_, or use an explicit invocant or argument,
# or use &abs to refer to the function as a noun
In this case, providing an C<abs> sub that doesn't take any arguments, did
not make the compilation error go away.
use isms <Perl5>;
sub abs() { say "foo" }
abs; # foo
By specifying C<use isms>, the compiler will allow the offending Perl 5
construct, allowing the code to actually be executed.
=item X<B<lib>|lib> L<Finding Modules|/language/modules#Finding_Modules>
=item X<B<newline>|newline>
Expand Down

0 comments on commit c188d79

Please sign in to comment.