# New Ticket Created by  David Warring 
# Please include the string:  [perl #123276]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123276 >


Consider three simple classes:

lib/A.pm:
class A {}

lib/A/B/C1.pm:
class A::B::C1 { use A; method foo(){} }

lib/A/B/C2.pm:
class A::B::C2 { use A; method foo(){} }

% perl6-m --version
This is perl6 version 2014.11-9-g3bbf7bc built on MoarVM version 
2014.11-17-g972d95b
% perl6-m --target=mbc --output=blib/lib/A.pm.moarvm lib/A.pm
% perl6-m --target=mbc --output=blib/lib/A/B/C1.pm.moarvm lib/A/B/C1.pm
% perl6-m --target=mbc --output=blib/lib/A/B/C2.pm.moarvm lib/A/B/C2.pm
% perl6-m -I blib/lib -e'use A::B::C1; use A::B::C2; say A::B::C1.^methods'
Could not find symbol '&C1'
  in method <anon> at src/gen/m-CORE.setting:13777
  in any find_method_fallback at src/gen/m-Metamodel.nqp:2725
  in any find_method at src/gen/m-Metamodel.nqp:988
  in block <unit> at -e:1

With parrot:

% perl6-p -I blib/lib --target=pir --output=blib/lib/A.pm.pir lib/A.pm
% perl6-p -I blib/lib --target=pir --output=blib/lib/A/B/C1.pm.pir lib/A/B/C1.pm
% perl6-p -I blib/lib --target=pir --output=blib/lib/A/B/C2.pm.pir lib/A/B/C2.pm
% perl6-p -I blib/lib -e'use A::B::C1; use A::B::C2; say A::B::C1.^methods'
Could not find symbol '&C1'
  in method <anon> at gen/parrot/CORE.setting:13717
  in any find_method_fallback at gen/parrot/Metamodel.nqp:2795
  in any find_method at gen/parrot/Metamodel.nqp:989
  in any  at gen/parrot/BOOTSTRAP.nqp:1708
  in block <unit> at -e:1

and with JVM backend.

% perl6-j --target=jar --output=blib/lib/A.pm.jar lib/A.pm
% perl6-j --target=jar --output=blib/lib/A/B/C1.pm.jar lib/A/B/C1.pm
% perl6-j --target=jar --output=blib/lib/A/B/C2.pm.jar lib/A/B/C2.pm
% perl6-j -I blib/lib -e'use A::B::C1; use A::B::C2; say A::B::C1.^methods'
Could not find symbol '&C1'
  in method <anon> at gen/jvm/CORE.setting:13700
  in any find_method_fallback at gen/jvm/Metamodel.nqp:2714
  in any find_method at gen/jvm/Metamodel.nqp:988
  in any  at gen/jvm/BOOTSTRAP.nqp:1700
  in block <unit> at -e:1

Attachment: A.tgz
Description: application/compressed

Reply via email to