From: Stevan Little Date: Sat, 11 Mar 2006 17:12:37 +0000 (+0000) Subject: changes X-Git-Tag: 0.13~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FClass-C3.git;a=commitdiff_plain;h=5f01eb5f727c1a755a0a5f9856d5d945357ab6ec changes --- diff --git a/ChangeLog b/ChangeLog index 13eb9b0..b0c5be6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Revision history for Perl extension Class::C3. +0.12 + - clarifying docs for &initialize (thanks jcs) + 0.11 Thurs. Feb 23, 2006 - added some more tests for edge cases - removed INIT, you must explicitly call &initialize now diff --git a/README b/README index 5e61818..0b51f8e 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Class::C3 version 0.11 +Class::C3 version 0.12 =========================== INSTALLATION diff --git a/lib/Class/C3.pm b/lib/Class/C3.pm index 2d0d04f..bd72a00 100644 --- a/lib/Class/C3.pm +++ b/lib/Class/C3.pm @@ -7,7 +7,7 @@ use warnings; use Scalar::Util 'blessed'; use Algorithm::C3; -our $VERSION = '0.11'; +our $VERSION = '0.12'; # this is our global stash of both # MRO's and method dispatch tables @@ -315,7 +315,21 @@ 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 -you do not do this. It is advised to do this as soon as possible B any classes which use C3. +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: + + package Foo; + use Class::C3; + # ... Foo methods here + + package Bar; + use Class::C3; + use base 'Foo'; + # ... Bar methods here + + package main; + + Class::C3::initialize(); # now it is safe to use Foo and Bar This function used to be called automatically for you in the INIT phase of the perl compiler, but that lead to warnings if this module was required at runtime. After discussion with my user base