A Peek into Pugs Internals #37

Rules version

my $obj = m{
    Car =
        [ Ferrari
          : { return Car.new(:color<red>) }
        | ModelT $<year>:=(\d\d\d\d)
          : { return Car.new(:color<black> :$<year>) }
        ]
};
Copyright © 2006 Gaal Yahas