# New Ticket Created by # Please include the string: [perl #124141] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=124141 >
The core problem is that "Invalid typename", while *technically* correct, isn't as helpful as it could be. It's invalid only because it's not been imported into the file. At the time I figured that (bolstered by the documentation) that 'use Bug::Level::Role' wasn't needed in perl6 as it could determine what class to import from the name. So I went off on a wild goose chase for 30 minutes playing with the pathname and filename before realizing "Oh, well, I guess I'll add the 'use' declaration." While I realize this is somewhat perl5-centric of me, this will be a common programmer mistake (I know I've made it lots of times myself in perl5,) and I feel there should be some explanatory text like "Invalid typename (Maybe you forgot an 'use Bug::Role' declaration?)" would be helpful to get programmers back on track. The other issues are that of documentation, mostly. The 'use' keyword should be documented, entering it on http://docs.perl.org/ only returns 'cause' as a function, which is unhelpful. At least one example in 'classtut' should contain a 'use' declaration - all of the examples rely on inline class declarations, which is fine for copypasta but not for real-world usage. At least one example should contain a two-level package hierarchy, so novice perl6 programmers get to see the '::' in action. Those of us that use perl5 know this, but it's not documented. Larry may own the colon, but that doesn't mean we have to eliminate it from the documentation :) The error text: --cut here-- ===SORRY!=== Error while compiling /home/jgoff/Documents/error/lib/Bug/Level/Zero.pm6 Invalid typename at /home/jgoff/Documents/error/lib/Bug/Level/Zero.pm6:3 ------> class Bug::Level::Zero does Bug::⏏Role { from t/01-basic.t:2 --cut here-- rakudo version: -- commit d835c8e3d5810ad6c6efae3a52d377311ba32bb4 Author: jnthn <jn...@jnthn.net> Date: Sat Mar 21 11:52:32 2015 +0100 t/01-basics.t: --cut here-- use v6; use Bug::Level::Zero; --cut here-- lib/Bug/Level/Zero.pm6: --cut here-- use v6; class Bug::Level::Zero does Bug::Role { } --cut here-- lib/Bug/Role.pm6: --cut here-- use v6; role Bug::Role { } --cut here--