fork download
  1. #!/usr/bin/perl6
  2.  
  3. BEGIN {
  4. if $*PERL.version before Version.new('6.c') {
  5. my $first-release-date = Date.new: 2015,12,25;
  6. say "This version of the compiler $*PERL.compiler.version()";
  7. say "is from before the official release of Perl 6 on $first-release-date.";
  8.  
  9. say '';
  10.  
  11. my $compiler = $*PERL.compiler;
  12. my ($year,$month) = $compiler.version.parts[0,1];
  13. my $this-compiler-date = Date.new( :$year, :$month );
  14. say "In fact it could be from { $first-release-date - $this-compiler-date } days before that.";
  15. my $build-date = $compiler.build-date.Date;
  16. say "It was built on $build-date, which is still { $first-release-date - $build-date } days before the release.";
  17.  
  18. say '';
  19. say 'refusing to run';
  20. exit 1;
  21. }
  22. }
  23.  
  24. say {[X] $^a xx$^b}( (0,1), 2 );
  25. say {[X] $^a xx$^b}( (1,0), 2 );
  26. say {[X] $^a xx$^b}( (0,1,2), 2 );
  27.  
  28. say {[X] $^a xx$^b}( (0,1), 5 );
Runtime error #stdin #stdout 0.84s 219264KB
stdin
Standard input is empty
stdout
This version of the compiler 2014.7
is from before the official release of Perl 6 on 2015-12-25.

In fact it could be from 542 days before that.
It was built on 2014-09-16, which is still 465 days before the release.

refusing to run