massive updates to the way immutable works to fix a big ish bug, please see new comme...
[gitmo/Class-MOP.git] / Changes
CommitLineData
7c90a1a8 1Revision history for Perl extension Class-MOP.
0ac992ee 20.39
3 * Class::MOP::Class::Immutable
4 - added make_metaclass_mutable + docs (groditi)
5 - removed unused variable
6
7 * Class::MOP::Class
8 - Immutability can now be undone,
9 added make_mutable + tests + docs (groditi)
04dd7510 10 - Massive changes to the way Immutable is done
11 for details see comments next to make_immutable
12 This fixes a bug where custom metaclasses broke
13 when made immutable. We are now keeping one immutable
14 metaclass instance per metaclass instead of just one
15 to prevent isa hierarchy corruption. Memory use will go
16 up, but I suspect it will be neglible.
17 - New tests added for this behavior. (groditi)
7c90a1a8 18
c0fcd6ab 190.38 Thurs. May 31, 2007
823a5d31 20 ~~ More documentation updates ~~
c81de280 21
823a5d31 22 * Class::MOP::Package
23 - we now deal with stub methods properly
24 - added tests for this
c0fcd6ab 25 - fixed some tests failing on 5.9.5 (thanks blblack)
c81de280 26
b25109b1 27 * Class::MOP::Attribute
28 - added get_read_method and get_write_method
c81de280 29 thanks to groditi for this code, tests
30 and docs.
b25109b1 31 - added tests and POD for this
795a0c8b 32
33 * Class::MOP::Class
34 - fixed RT issue #27329, clone object now
35 handles undef values correctly.
36 - added tests for this
d4ba1677 37 - Corrected anon-class handling so that they
38 will not get reaped when instances still
39 exist which need to reference them. This is
40 the correct behavior, hopefully this is an
41 obscure enough feature that there are not too
42 many work arounds out in the wild.
43 - added tests for this by groditi
95514cb4 44 - updated docs to explain this
45
46 * metaclass
c0fcd6ab 47 - load custom metaclasses automatically (thanks groditi)
f2266181 48 - added tests for this behavior
a06797b0 49
3dc99d93 500.37 Sat. March 10, 2007
448b6e55 51 ~~ Many, many documentation updates ~~
52
53 * Class::MOP
54 - added &load_class and &is_class_loaded
55 - added tests and docs for these
2367814a 56
9363ea89 57 * Class::MOP::Attribute
58 - default now checks the instance with defined to
59 avoid setting off bool-overloads (found by Carl Franks)
60
c23184fc 610.37_002
62 * /t
63 - bad name in a test, causing meaningless failuress.
64 No other changes.
65
660.37_001
67
68 ~~ GLOBAL CHANGES ~~
69 - All attribute names are now consistent and follow Perl 6
70 style (prefixed with the sigil, and ! as the twigil for
71 private attrs). This should not affect any code, unless
72 you broke encapsulation, in which case, it is your problem
73 anyway.
74
75 !! Class::MOP::Class::Immutable has been removed
76
77 * Class::MOP::Method::Constructor
78 - this has been moved out of Class::MOP::Class::Immutable
79 and is a proper subclass of Class::MOP::Method now.
80
81 * Class::MOP::Class
82 - this module now uses Class::MOP::Immutable for the
83 immutable transformation instead of
84 Class::MOP::Class::Immutable.
85
86 + Class::MOP::Immutable
87 - this module now controls the transformation from a mutable
88 to an immutable version of the class. Docs for this will
89 be coming eventually.
90
91
cdc1ecba 920.36 Sun. Nov. 5, 2006
a651e249 93 * Class::MOP::Class
94 - added a few 'no warnings' lines to keep annoying
95 (and meaningless) warnings from chirping during
96 global destruction.
0870928c 97
98 * Class::MOP
99 - some more bootstrapping is now done on the new
100 classes
101
102 * Class::MOP::Class::Immutable
103 *** API CHANGE ***
104 - constructor generation is now handled by
105 the Class::MOP::Method::Constructor class
106
107 * Class::MOP::Method::Constructor
108 - created this to handle constructor generation
109 in Class::MOP::Class::Immutable
110
111 * Class::MOP::Attribute
112 *** API CHANGE ***
113 - attributes now delegate to the
114 Class::MOP::Method::Accessor to generate
115 accessors
116
117 * Class::MOP::Method::Accessor
118 - all accessor generation functions from
119 Class::MOP::Attribute have been moved here
a651e249 120
80f00c79 1210.35 Sat. Sept. 30, 2006
8745cf22 122
123 * scripts/class_browser.pl
124 - initial prototype of a class browser, more
125 on this to come. Comments and patches are
126 very much welcome.
b1897d4d 127
128 * Class::MOP
3e86c902 129 - All Class::MOP::* accessors are no longer
130 re-generated in the bootstrap, instead
6d2118a4 131 they are aliased from the originals
6d2118a4 132 - fixed tests to reflect
b1897d4d 133 - added Class::MOP::Method (and its subclasses)
134 to the bootstrap
135 - adjusted tests for this
86482605 136 - added the Class::MOP::Instance attributes
137 to the bootstrap
b1897d4d 138
139 * Class::MOP::Method
140 *** API CHANGE ***
141 - methods are no longer blessed CODE refs
142 but are actual objects which can be CODE-ified
143 - adjusted tests to compensate
86482605 144 - adjusted docs for this
b1897d4d 145
146 * Class::MOP::Class
147 - changed how methods are dealt with to
148 encapsulate most of the work into the
149 &get_method_map method
150 - made several adjustments for the change
151 in Class::MOP::Method
152 - &add_attribute now checks if you are adding
153 a duplicate name, and properly removes the
154 old one before installing the new one
155 - added tests for this
86482605 156 - adjusted docs for this
b1897d4d 157
158 * Class::MOP::Class::Immutable
159 - added caching of &get_method_map
160 - fixed issue with &get_package_symbol
161 - cleaned up the methods that die (patch by David Wheeler)
162
163 * Class::MOP::Package
164 - added filtering capabilities to
165 &list_all_package_symbols
166
a549ce50 1670.34 Sat. Aug. 26, 2006
c4260b45 168 * Class::MOP::Class
169 - added the %:methods attribute, which like
170 the $:version and such just actually goes
171 to the symbol table to get it's stuff.
172 However, it makes the MOP more complete.
88dd563c 173 ** API CHANGE **
174 - The &create method now requires that all
175 but the package name now is passed in as
176 named parameters. See docs for more info.
177 - updated docs and tests for this
c4260b45 178
179 * Class::MOP::Object
180 - added &dump method to easily Data::Dumper
181 an object
182
183 * Class::MOP
184 - cleaned up the initialization of attributes
185 which do not store things in the instance
186 - added the %:methods attribute definition to
187 the bootstrap
88dd563c 188
189 ~ lots of misc. test cleanup
c4260b45 190
56e8dd5d 1910.33 Sat. Aug. 19, 2006
be7677c7 192 * Class::MOP::Class
193 - moved the metaclass cache out of here
194 and it is now in Class::MOP itself.
56e8dd5d 195
196 * Class::MOP
197 - moved all the metaclass cache stuff here
198 - fixed all tests for this
be7677c7 199
148b4697 200 * Class::MOP::Attribute
201 - reference values (other than CODE refs)
202 are no longer allowed for defaults
203 - added tests for this
56dcfc1a 204
205 * Class::MOP::Package
206 - fixed an issue with perl 5.8.1 and how it deals
e3a2c885 207 with symbol tables. The namespace hash is now
208 always reloaded from the symbol table.
209
210 ~ lots of misc. documentation cleanup
1396f86b 211
716c5765 2120.32 Sat. Aug. 12, 2006
6e57504d 213 + added Class::MOP::Object so that the
214 metamodel is more complete (and closer
215 to what Perl 6 will probably be).
216
9ca19585 217 * Class::MOP::Package
218 - refactored entire class, this is now
219 the primary gateway between the metaclass
220 and the Perl 5 symbol table
221 - added many tests for this
6e57504d 222 - this class is now a subclass of
223 Class::MOP::Object
716c5765 224 - added some tests to reflect this
9ca19585 225
226 * Class::MOP::Class
227 - refactored all symbol table access to
228 use Class::MOP::Package methods instead
f0480c45 229
230 * Class::MOP::Module
231 - adding the $:version attribute in the bootstrap
232 so that Module has a version as an attribute
233 - see comment in Class::MOP for details
234 - added the $:authority attribute to this module
235 as well as an &identifier method, to bring us
236 ever closer to Perl 6 goodness
716c5765 237 - I have added $AUTHORITY to all the modules
238 - added tests for this
9ca19585 239
f0480c45 240 * Class::MOP::Instance
241 - added &deinitialize_slot for removing slots
242 from an instance
243 - added tests for this
9ca19585 244
245 * Class::MOP::Attribute
246 - added support for &deinitialize_slot for removing
247 slots from an instance
248 - added tests for this
249
1a09d9cc 2500.31 Sat. July 15, 2006
251
b679e644 252 * Class::MOP::Class
253 - added &find_method_by_name to locate a method
254 anywhere within the class hierarchy
255
256 * Class::MOP::Attribute
257 - added &set_value and &get_value for getting
258 the value of the attribute for a particular
259 instance.
260
373a16ae 2610.30 Wed. July 5, 2006
262 ---------------------------------------
263 This is the first version of Class::MOP
264 to introduce the immutable features which
265 will be used for optimizating the MOP.
266 This support should still be considered
267 experimental, but moving towards stability.
268 ---------------------------------------
e0a82090 269
373a16ae 270 * Created Class::MOP::Class::Immutable
be960ba1 271
373a16ae 272 * Created the Class::MOP::Package and
273 Class::MOP::Module classes to more
274 closely conform to Perl 6's meta-model
e0a82090 275
276 * Class::MOP::Class
277 - now inherits from Class::MOP::Module
278 - several methods moved to ::Module and
279 ::Package and now inherited
280 - added tests for this
c0cbf4d9 281
282 * Class::MOP::Instance
283 - added an is_inlinable method to allow other
284 classes to check before they attempt to optimize.
be960ba1 285 - added an inline_create_instance to inline
286 instance creation (of course)
287
2ba153a9 288 ** API CHANGE **
289 - the Class::MOP::Class::*_package_variable
290 methods are all now methods of Class::MOP::Package
291 and called *_package_symbol instead. This is
292 because they are now more general purpose symbol
293 table manipulation methods.
e0a82090 294
cdfaa4cc 2950.29_02 Thurs. June 22, 2006
296 ++ DEVELOPER RELEASE ++
df7b4119 297 * Class::MOP::Class
298 - small change in &create so that it behaves
299 properly when inherited
cdfaa4cc 300 - small fix to &clone_instance
df7b4119 301
667cecf3 3020.29_01 Fri. May 12, 2006
303 ++ DEVELOPER RELEASE ++
304 - This release works in combination with
305 Moose 0.09_01, it is a developer release
306 because it introduces a new instance
307 sub-protocol and has not yet been
308 optimized.
309
40483095 310 * Class::MOP::Class
311 - anon-classes are now properly garbage collected
312 - added tests for this
195f5bf8 313 - improved method modifier wrapping
40483095 314
2bab2be6 315 * Class::MOP::Instance
1becdfcc 316 - added new instance protocol
2bab2be6 317 - added tests for this
318 - changed all relevant modules and examples
319 - Class::MOP::Class
320 - Class::MOP::Attribute
321 - examples/*
322
1becdfcc 323 * metaclass
324 - you no longer need to specify the metaclass
325 itself, if it is not there, Class::MOP::Class
326 is just assumed
327 - updated tests for this
328
329 * examples/
330 - added ArrayBasedStorage example to show
331 instance storage using ARRAY refs instead of
332 HASH refs.
333 - added tests for this
334 - InsideOutClass is totally revised using the
335 new instance protocol
336 - added more tests for this
337
93b4e576 3380.26 Mon. April 24, 2006
e7f732e4 339 * Class::MOP::Class
340 - added find_attribute_by_name method
341 - added tests and docs for this
56a0b530 342 - some small optimizations
343
344 * Class::MOP::Attribute
345 - some small optimizations
e7f732e4 346
46666f33 3470.25 Thurs. April 20, 2006
587aca23 348 * Class::MOP::Class
349 - added create_anon_class for creating anonymous classes
350 - added tests for this
351 - added get_all_metaclasses, get_all_metaclass_names
352 and get_all_metaclass_instances method to allow
353 access to all the cached metaclass objects.
bd4e03f9 354 - attribute slot initialization is now the responsibility
355 of the attribute itself, and construct_instance now
356 delegates appropriately
357
358 * Class::MOP::Attribute
359 - attribute slot initialization is now the responsibility
360 of the attribute itself, so we added a method for it
361 called initialize_instance_slot
fed4cee7 362
363 * examples/
364 - adjusted all the examples to use the new attribute
365 initialize_instance_slot method
587aca23 366
1daaa2b2 3670.24 Tues. April 11, 2006
8c936afc 368 * Class::MOP::Class
369 - cleaned up how the before/after/around method
370 modifiers get named with Sub::Name
371
b9dfbf78 3720.23 Thurs. March 30, 2006
a977cf65 373 * Class::MOP::Class
374 - fixed the way attribute defaults are handled
375 during instance construction (bug found by chansen)
b9dfbf78 376
377 * Class::MOP::Attribute
378 - read-only accessors ('reader') will now die if
379 passed more than one argument (attempting to write
380 to them basically)
381 - added tests for this
382 - adjusted all /example files to comply
a977cf65 383
f9eba090 3840.22 Mon. March 20, 2006
0eff2c16 385 * Class::MOP::Class
386 - localized $@ in the *_package_variable functions
387 because otherwise, it does ugly things in Moose.
388 - added test case for this
389
1988e85e 3900.21 Wed. March 15, 2006
2f6d5412 391 * Class::MOP::Class
392 - fixed issue where metaclasses are reaped from
393 our cache in global destruction, and so are not
394 available in DESTORY calls
395
96ceced8 3960.20 Thurs. March 2, 2006
d3cb0d4a 397 - removed the dependency for Clone since
398 we no longer to deep-cloning by default.
a4258ffd 399
400 * Class::MOP::Method
96ceced8 401 - added &package_name, &name and
402 &fully_qualified_name methods, some of
a4258ffd 403 which were formerly private subs in
404 Class::MOP::Class
405
406 * Class::MOP::Method::Wrapped
407 - allows for a method to be wrapped with
408 before, after and around modifiers
409 - added tests and docs for this feature
d3cb0d4a 410
411 * Class::MOP::Class
58d75218 412 - improved &get_package_symbol
96ceced8 413 - &version and &superclasses now use it
a4258ffd 414 - methods are now blessed into Class::MOP::Method
415 whenever possible
a4258ffd 416 - added methods to install CLOS-style method modifiers
417 - &add_before_method_modifier
418 - &add_after_method_modifier
419 - &add_around_method_modifier
420 - added tests and docs for these
96ceced8 421 - added &find_next_method_by_name which finds the
422 equivalent of SUPER::method_name
d3cb0d4a 423
1c020571 4240.12 Thurs. Feb 23, 2006
d89c0fad 425 - reduced the dependency on B, no need to always
426 have the latest
427
1c020571 428 * examples/
429 - added docs to the C3 method dispatch order test
430 - fixed missing Algorithm::C3 dependency by making
431 the test skip if it is not installed
432
0dea7280 4330.11 Mon Feb. 20, 2006
f3f5bd34 434 * examples/
435 - added example of changing method dispatch order to C3
a27ae83f 436
437 * Class::MOP::Class
19d4b5b8 438 - changed how clone_instance behaves, it now only does a
439 shallow clone (see docs for more details)
a27ae83f 440 - added docs and tests
f3f5bd34 441
3bf7644b 4420.10 Tues Feb. 14, 2006
443 ** This release was mostly about writing more tests and
444 cleaning out old and dusty code, the MOP should now
445 be considered "ready to use".
446
22286063 447 - adding more tests to get coverage up a little higher,
448 mostly testing errors and edge cases.
449 - test coverage is now at 99%
aa448b16 450
451 * Class::MOP
452 - no longer optionally exports to UNIVERSAL::meta or
453 creates a custom metaclass generator, use the
454 metaclass pragma instead.
22286063 455
456 * Class::MOP::Class
457 - fixed a number of minor issues which came up in the
458 error/edge-case tests
459
460 * Class::MOP::Attribute
461 - fixed a number of minor issues which came up in the
462 error/edge-case tests
463
0b8eb325 464 * examples/
ea263060 465 - fixing the AttributesWithHistory example, it was broken.
663f8198 466
550d56db 4670.06 Thurs Feb. 9, 2006
677eb158 468 * metaclass
550d56db 469 - adding new metaclass pragma to make setting up the
677eb158 470 metaclass a little more straightforward
7b31baf4 471
472 * Class::MOP
473 - clean up bootstrapping to include more complete
474 attribute definitions for Class::MOP::Class and
475 Class::MOP::Attribute (accessors, readers, writers,
476 etc.) ... it is redundant, but is useful meta-info
477 to have around.
677eb158 478
99e5b7e8 479 * Class::MOP::Class
480 - fixing minor meta-circularity issue with &meta, it
481 is now more useful for subclasses
7b31baf4 482 - added &get_attribute_map as an accessor for the
483 hash of attribute meta objects
c9e77dbb 484 - &compute_all_applicable_attributes now just returns
485 the attribute meta-object, rather than the HASH ref
486 since all the same info can be gotten from the
487 attribute meta-object itself
488 - updated docs & tests to reflect
5f3c057a 489 - added &clone_instance method which does a deep clone
490 of the instance structure created by &construct_instance
491 - added docs & tests for this
550d56db 492 - added Clone as a dependency
5f3c057a 493 - added &new_object and &clone_object convience methods to
494 return blessed new or cloned instances
2a7575a6 495 - they handle Class::MOP::Class singletons correctly too
5f3c057a 496 - added docs & tests for this
2a7575a6 497 - cleaned up the &constuct_class_instance so that it behaves
498 more like &construct_instance (and managed the singletons too)
550d56db 499 - added the &check_metaclass_compatibility method to make sure
500 that metaclasses are upward and downward compatible.
501 - added tests and docs for this
5f3c057a 502
99e5b7e8 503 * examples/
504 - adjusting code to use the &Class::MOP::Class::meta
505 fix detailed above
677eb158 506 - adjusting code to use the metaclass pragma
99e5b7e8 507
aa9c883e 5080.05 Sat Feb. 4, 2006
2e41896e 509 * Class::MOP::Class
510 - added the &attribute_metaclass and &method_metaclass
351bd7d4 511 attributes which contain a metaclass name to use for
2e41896e 512 attributes/methods respectively
351bd7d4 513
514 * Class::MOP
515 - bootstrap additional attributes for Class::MOP::Class
2e41896e 516
517 * examples/
518 - adjusted the example code and tests to use the new
519 &attribute_metaclass feature of Class::MOP::Class
aa9c883e 520 - added new example:
521 - LazyClass
2e41896e 522
d7c2cbe3 5230.04 Fri Feb. 3, 2006
d6fbcd05 524 * Class::MOP::Class
525 - some documentation suggestions from #perl6
526
527 * Class::MOP::Attribute
528 - improved error messages
529
530 * examples/
531 - added new examples:
532 - AttributesWithHistory
d7c2cbe3 533 - ClassEncapsultedAttributes
343203ee 534
9ec169fe 5350.03 Fri Feb. 3, 2006
536 - converted to Module::Build instead of EU::MM
537
538 * Class::MOP::Attribute
539 - refactored method generation code
540 - attributes are now associated with class directly
541
f71f4295 542 * examples/
9ec169fe 543 - refactored the InsideOut example to take advantage
544 of the Class::MOP::Attribute refactoring
f71f4295 545 - changed example files to .pod files and hide thier
546 package names from PAUSE (I don't want to own these
547 namespaces really, they are just examples)
9ec169fe 548
a57c7fa2 5490.02 Thurs Feb. 2, 2006
550 - moving examples from t/lib/* to examples/*
551 - adding POD documentation to the examples
552
a2e85e6c 5530.01 Thurs Feb. 2, 2006
7c90a1a8 554 - Initial release