From: Dave Rolsky Date: Fri, 29 Aug 2008 17:40:43 +0000 (+0000) Subject: More tweaking of t0m's doc changes X-Git-Tag: 0.55_02~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=457ad5fca1742d8f2a1a3561fab578e862344120;p=gitmo%2FMoose.git More tweaking of t0m's doc changes --- diff --git a/lib/Moose/Cookbook/FAQ.pod b/lib/Moose/Cookbook/FAQ.pod index ee14c71..74f06d1 100644 --- a/lib/Moose/Cookbook/FAQ.pod +++ b/lib/Moose/Cookbook/FAQ.pod @@ -284,17 +284,14 @@ is not called for my composed roles?> question in the B section. =head3 What are Traits, and how are they different to Roles? -In Moose, a trait is almost exactly the same thing as a role, except that -traits typically register themselves, and thus can be referred to by a short name. - -The word I is typically used to indicate a class building block, which -is composed into a class at class composition time, whereas I is used to -indicate functionality which is composed into an instance of a class at runtime -to add or modify the behavior of B. - -But this is all just convention, so don't take it too seriously - nobody -is going to yell at you if you use them interchangeably, or use one instead -of the other. +In Moose, a trait is almost exactly the same thing as a role, except +that traits typically register themselves, which allows you to refer +to them by a short name ("Big" vs "MyApp::Role::Big"). + +In Moose-speak, a I is usually composed into a I at +compile time, whereas a I is usually composed into an instance +of a class at runtime to add or modify the behavior of B. Outside the context of Moose, traits and roles generally mean exactly the same thing. The original paper called them Traits, however Perl 6 will call