X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FC3.pm;h=3551a1e6f0a7e9c1cfbc9831157ab23c92b23191;hb=0382e71fc96c15e00877b9777e7df38d58ed8e3d;hp=5f5c20334c494ee18c80ce63c3a95570313011c1;hpb=321a86a0f8b3b0065c62f2146a693542d26a032c;p=gitmo%2FClass-C3.git diff --git a/lib/Class/C3.pm b/lib/Class/C3.pm index 5f5c203..3551a1e 100644 --- a/lib/Class/C3.pm +++ b/lib/Class/C3.pm @@ -44,7 +44,7 @@ BEGIN { # this: # # $MRO{$class} = { -# MRO => [ ], +# MRO => [ ], # methods => { # orig => , # code => \& @@ -290,13 +290,13 @@ to using this implementation on older perls. C3 is the name of an algorithm which aims to provide a sane method resolution order under multiple inheritance. It was first introduced in the langauge Dylan (see links in the L section), -and then later adopted as the prefered MRO (Method Resolution Order) for the new-style classes in +and then later adopted as the preferred MRO (Method Resolution Order) for the new-style classes in Python 2.3. Most recently it has been adopted as the 'canonical' MRO for Perl 6 classes, and the default MRO for Parrot objects as well. =head2 How does C3 work. -C3 works by always preserving local precendence ordering. This essentially means that no class will +C3 works by always preserving local precedence ordering. This essentially means that no class will appear before any of its subclasses. Take the classic diamond inheritance pattern for instance: @@ -350,7 +350,7 @@ Given a C<$class> this will return an array of class names in the proper C3 meth =item B -This B to initalize the C3 method dispatch tables, this module B if +This B to initialize the C3 method dispatch tables, this module B if you do not do this. It is advised to do this as soon as possible B loading any classes which use C3. Here is a quick code example: @@ -455,7 +455,7 @@ But there are still caveats, so here goes ... =item Use of C. -The idea of C under multiple inheritance is ambigious, and generally not recomended anyway. +The idea of C under multiple inheritance is ambiguous, and generally not recomended anyway. However, its use in conjuntion with this module is very much not recommended, and in fact very discouraged. The recommended approach is to instead use the supplied C feature, see more details on its usage above.