Help for this page

Select Code to Download


  1. or download this
    class c { has $.lb }
    
  2. or download this
    class c {
        has $!lb;
        #| Auto-generated if there's no explicit `lb` method: 
        method lb { $!lb }
    }
    
  3. or download this
    class c { has $.lb is rw; } # note the `is rw`
    
  4. or download this
    class c {
        has $!lb;
        #| Auto-generated if there's no explicit `lb` method: 
        method lb is rw { $!lb } # note the `is rw`
    }
    
  5. or download this
    my $container;
    class c {
    ...
    my $o = c.new;
    $o.m = 6;
    say $container # prints `6`, the container's contents