boftx has asked for the wisdom of the Perl Monks concerning the following question:

I don't have access to a Perl 6 install so I can't test this myself. What will happen if the following is executed under Perl 6?

#!/usr/bin/perl use strict; use warnings; use 5.030; exit;

If it will pass, can I force an exception just like under Perl 5 if I change the use statement to use 7.001;?

EDIT: Fixed buggered shebang line. :(

It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.

Replies are listed 'Best First'.
Re: Does Perl 6 reject a Perl 5 require?
by tobyink (Canon) on Mar 31, 2014 at 06:58 UTC

    Theoretically that should mark the lexical scope as being Perl 5 code. I don't think any Perl 6 implementations support it yet though.

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
Re: Does Perl 6 reject a Perl 5 require?
by choroba (Cardinal) on Mar 31, 2014 at 09:42 UTC
    Is it a trap or typo? !# is not #!.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      OOPS!

      It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.