Ticket #1372: tt1372.Getopt.Obj.pir.patch
File tt1372.Getopt.Obj.pir.patch, 1.8 KB (added by jkeenan, 12 years ago) |
---|
-
runtime/parrot/library/Getopt/Obj.pir
71 71 72 72 .sub __load :anon :load 73 73 .local pmc obj, spec, pns, ns 74 obj = newclass "Getopt::Obj"74 obj = newclass ['Getopt';'Obj'] 75 75 addattribute obj, "Specs" 76 76 addattribute obj, "notOptStop" 77 77 78 spec = newclass "Getopt::Obj::Spec"78 spec = newclass ['Getopt';'Obj';'Spec'] 79 79 addattribute spec, "name" 80 80 addattribute spec, "long" 81 81 addattribute spec, "short" 82 82 addattribute spec, "type" 83 83 addattribute spec, "optarg" 84 84 85 ns = get_hll_namespace [ "Getopt::Obj"]85 ns = get_hll_namespace ['Getopt';'Obj'] 86 86 $P0 = get_hll_namespace 87 87 pns = $P0.'make_namespace'('Getopt') 88 88 pns.'add_namespace'('Obj', ns) 89 ns = get_hll_namespace [ "Getopt::Obj::Spec"]89 ns = get_hll_namespace ['Getopt';'Obj';'Spec'] 90 90 pns = get_hll_namespace ['Getopt';'Obj'] 91 91 pns.'add_namespace'('Spec', ns) 92 92 .end … … 101 101 102 102 =cut 103 103 104 .namespace [ "Getopt::Obj"]104 .namespace ['Getopt';'Obj'] 105 105 106 106 =item C<init()> 107 107 … … 462 462 463 463 .sub "add" :method 464 464 .local pmc spec, specs 465 spec = new "Getopt::Obj::Spec"465 spec = new ['Getopt';'Obj';'Spec'] 466 466 specs = getattribute self, "Specs" 467 467 push specs, spec 468 468 .return(spec) … … 568 568 569 569 =head2 Class Getopt::Obj::Spec 570 570 571 Internal use only, at least don't do any new "Getopt::Obj::Spec"yourself...571 Internal use only, at least don't do any C<new ['Getopt';'Obj';'Spec'> yourself... 572 572 This makes an easy holder for each possible match. 573 573 574 574 =over 4 575 575 576 576 =cut 577 577 578 .namespace [ "Getopt::Obj::Spec"]578 .namespace ['Getopt';'Obj';'Spec'] 579 579 580 580 =item C<init()> 581 581