Help for this page

Select Code to Download


  1. or download this
        class example_record 
           does Compact 
           is finalized
    ...
              return $!presentation_cache;
              }
           }
    
  2. or download this
        my Buf $temp = $record;
        $stream.print ($temp);
        
        $stream.print (Buf $record);
    
  3. or download this
        $stream.write ($record);  # just what I need
        
        my int16 $x = 42;
        $stream.write ($x);  # emits 2 bytes, exactly as stored in the pri
    +mitive
        $stream.print ($x);  # emits characters "4" and "2" in the proper 
    +encoding
    
  4. or download this
        class VLI<2.0.1 cpan:DLUGOSZ> 
           does Compact
           {
    ...
               supports unique options for encoding variations
            }
           } # end class VLI
    
  5. or download this
        class C does Compact is rw
           {
           has int32 $x;
    ...
        my C $c;  # for a Compact class, empty prototype is not undef but 
    +default values
        $c.x= 5;  # OK
        $c.y.value = 1234567812345678;  # yuck
    
  6. or download this
        class VLI<2.0.1 cpan:DLUGOSZ> 
           does Compact::helper
           {
    ...
            has int32 $x;
            has Int $y is VLI;
            }