Help for this page

Select Code to Download


  1. or download this
    class Point {
      has $.x;
    ...
    
    my $point = Point.new(x => 2, y => 3);
    say $point.str;
    
  2. or download this
    {
      package Point;
    ...
    
    my $point = Point->new(x => 2, y => 3);
    print $point->str, "\n";