class Point { has Num ($x, $y); method inverted () { return Point->new( x => $y, y => $x ); } } #### class Cache::LRU { use Hash::Ordered; our $num_caches = 0; # class data (unused in this example) my $x = Hash::Ordered->new; # private instance data has UInt $max_size = 20; # public instance data method set ( Str $key, $value ) { if ( $x->exists($key) ) { $x->delete($key);