Advertisement
Guest User

perl6 module use problem

a guest
Sep 11th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.33 KB | None | 0 0
  1. #### FILE: lib/A/B.pm6
  2.  
  3. our class A::B is export;
  4. method a { say "A::B.a"; }
  5.  
  6. #### FILE: lib/A.pm6
  7.  
  8. module A;
  9. use A::B;
  10. our constant B = A::B;
  11. our sub v is export { say "A::v"; }
  12.  
  13. #### Invoke with perl6 -I lib/ -e 'use A; my $b = B.new;'
  14.  
  15. #### I get:
  16. ===SORRY!=== Error while compiling -e
  17. Undeclared name:
  18.     B used at line 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement