Switch package name for class+role composed class to be valid
authorMatt S Trout <mst@shadowcat.co.uk>
Wed, 12 Jan 2011 08:27:41 +0000 (08:27 +0000)
committerMatt S Trout <mst@shadowcat.co.uk>
Wed, 12 Jan 2011 08:33:16 +0000 (08:33 +0000)
commitc69190f1086805f314dbe3bc2926aa940abd4001
tree70674b71d94dce5bc7cb6431bb8237df3e5680a2
parent86fd58e79443f7642bb7d7dc2d9c20b64f6070f0
Switch package name for class+role composed class to be valid

We used to join together the components with + so you got -

  Class+Role1+Role2+Role3

however this then screws with Sub::Quote's ability to generate a constructor
into the final class since

  sub Class+Role1+Role2+Role3::new {

isn't valid perl. Therefore, I've switched the code to generate

  Class__WITH__Role1__AND__Role3__AND__Role3

which is substantially uglier but works. Thanks to DGL for the test
Changes
lib/Moo/Role.pm
lib/Role/Tiny.pm
t/accessor-roles.t [new file with mode: 0644]