Ticket #1372: tt1372.Getopt.Obj.pir.patch

File tt1372.Getopt.Obj.pir.patch, 1.8 KB (added by jkeenan, 5 years ago)

Adapted from tene's original patch in r43083

  • runtime/parrot/library/Getopt/Obj.pir

     
    7171 
    7272.sub __load :anon :load 
    7373    .local pmc obj, spec, pns, ns 
    74     obj = newclass "Getopt::Obj" 
     74    obj = newclass ['Getopt';'Obj'] 
    7575    addattribute obj, "Specs" 
    7676    addattribute obj, "notOptStop" 
    7777 
    78     spec = newclass "Getopt::Obj::Spec" 
     78    spec = newclass ['Getopt';'Obj';'Spec'] 
    7979    addattribute spec, "name" 
    8080    addattribute spec, "long" 
    8181    addattribute spec, "short" 
    8282    addattribute spec, "type" 
    8383    addattribute spec, "optarg" 
    8484 
    85     ns = get_hll_namespace ["Getopt::Obj"] 
     85    ns = get_hll_namespace ['Getopt';'Obj'] 
    8686    $P0 = get_hll_namespace 
    8787    pns = $P0.'make_namespace'('Getopt') 
    8888    pns.'add_namespace'('Obj', ns) 
    89     ns = get_hll_namespace ["Getopt::Obj::Spec"] 
     89    ns = get_hll_namespace ['Getopt';'Obj';'Spec'] 
    9090    pns = get_hll_namespace ['Getopt';'Obj'] 
    9191    pns.'add_namespace'('Spec', ns) 
    9292.end 
     
    101101 
    102102=cut 
    103103 
    104 .namespace ["Getopt::Obj"] 
     104.namespace ['Getopt';'Obj'] 
    105105 
    106106=item C<init()> 
    107107 
     
    462462 
    463463.sub "add" :method 
    464464    .local pmc spec, specs 
    465     spec = new "Getopt::Obj::Spec" 
     465    spec = new ['Getopt';'Obj';'Spec'] 
    466466    specs = getattribute self, "Specs" 
    467467    push specs, spec 
    468468    .return(spec) 
     
    568568 
    569569=head2 Class Getopt::Obj::Spec 
    570570 
    571 Internal use only, at least don't do any new "Getopt::Obj::Spec" yourself... 
     571Internal use only, at least don't do any C<new ['Getopt';'Obj';'Spec'> yourself... 
    572572This makes an easy holder for each possible match. 
    573573 
    574574=over 4 
    575575 
    576576=cut 
    577577 
    578 .namespace ["Getopt::Obj::Spec"] 
     578.namespace ['Getopt';'Obj';'Spec'] 
    579579 
    580580=item C<init()> 
    581581