Add ability for a base class to find its subclasses
[gitmo/Class-MOP.git] / Changes
CommitLineData
7c90a1a8 1Revision history for Perl extension Class-MOP.
b817e248 2
502dbf28 30.48 Mon. Nov. 16, 2007
d14f6cbe 4 * Class::MOP::Attribute
5 - fixed get_read/write_method to handle the
6 HASH ref case, which makes the
7 get_read/write_method_ref handle it too.
8 - added more tests for this
9
742fb371 100.47 Sat. Nov. 24, 2007
11 * Class::MOP::Attribute
12 - fixed misspelling in get_write_method_ref
78d9bb38 13 - added more tests for this
742fb371 14
fe7c0b15 150.46 Fri. Nov. 23, 2007
b7bdffc3 16 * Class::MOP::Class
17 - added the linearized_isa method instead of constantly
18 pruning duplicate classes (this will be even more
19 useful in the 5.10-compat version coming soon)
5da16d1b 20
21 * Class::MOP::Attribute
22 - added the get_read_method_ref and get_write_method_ref
23 methods which allow you to retrieve a CODE ref which
24 can always be used to read or write an attribute.
b7bdffc3 25
1a5cc82e 260.45 Thurs. Nov. 13, 2007
232c4e13 27 * Class::MOP::Attribute
28 - Fix error message on confess (groditi)
29
544143b2 300.44 Thurs. Nov. 13, 2007
31 - Apparently I didn't make dist correctly (groditi)
32
c0aeeb91 330.43 Thurs. Nov. 13, 2007
b08fd50c 34 * Class::MOP
1d68af04 35 - Add support for the 'builder' attribute (groditi)
36
b08fd50c 37 * Class::MOP::Class
38 - optimise metaclass-already-exists check in
39 construct_class_instance (groditi)
40 - duplicate check into initialize to save a
41 call through (groditi)
42
1d68af04 43 * Class::MOP::Attribute
44 - Add support for the 'builder' attribute (groditi)
8768ecf3 45 - Make predicates check for the existence of a value, not whether
b08fd50c 46 it is defined (groditi)
8768ecf3 47
48 * Class::MOP::Instance
49 - Make predicates check for the existence of a value, not whether
b08fd50c 50 it is defined (groditi)
8768ecf3 51
565f0cbb 52 * Class::MOP::Method::Accessor
53 - made this a subclass of Class::MOP::Method::Generated
54 - removed the relevant attributes
55
56 * Class::MOP::Method::Constructor
57 - fixed the cached values we had to be more sane
58 - made this a subclass of Class::MOP::Method::Generated
59 - fixed generated constructor so it properly handles
60 subclasses now.
61 - added tests for this
62 - added the option to allow for both inlined and
63 non-inlined constructors.
b08fd50c 64 - Update inlined methods for builder and predicate changes (groditi)
565f0cbb 65
66 * Class::MOP::Method::Generated
67 - added this class as an abstract base for the
68 Class::MOP::Method::{Constructor,Accessor} classes
69 - added tests for this
70
b08fd50c 71 *t/
72 - Alter tests (005, 014 020, 021) for new builder addition (groditi)
73 - Tests for new predicate behavior (and corrections to old tests) (groditi)
74
75 *examples/
76 - Update ArrayRef based class example to work with predicate changes
77
367183c4 780.42 Mon. July 16, 2007
9195ddff 79 !!! Horray for mst, he fixed it !!!
80
92af7fdf 81 * Class::MOP::Package
82 - alter symbol table handling to deal with 5.8.x and 5.9.x
9195ddff 83
92af7fdf 84 * t/
9195ddff 85 - Get rid of the crappy workaround from 0.40/41
92af7fdf 86
829f7554 870.41 Sun. July 15, 2007
88 * t/
89 Arghh!!! My TODO test didn't work, so I handle
90 it manually now so that people can use this
91 with 5.9.5/bleadperl without issue.
92
1d7205b8 930.40 Tues, July 3, 2007
9f88b8ff 94 * t/
95 ~ marked a test in 003_methods.t as TODO
1d7205b8 96 for perl 5.9.5 (this test is irrelvant to
97 the module functioning on 5.9.5 for the most
98 part anyway)
9f88b8ff 99
28acb786 1000.39 Mon. June 18, 2007
b817e248 101 * Class::MOP::Immutable
0ac992ee 102 - added make_metaclass_mutable + docs (groditi)
103 - removed unused variable
d9586da2 104 - added create_immutable_transformer
105 necessary for sane overloading of immutable behavior
106 - tests for this (groditi)
0ac992ee 107
108 * Class::MOP::Class
109 - Immutability can now be undone,
110 added make_mutable + tests + docs (groditi)
04dd7510 111 - Massive changes to the way Immutable is done
112 for details see comments next to make_immutable
113 This fixes a bug where custom metaclasses broke
114 when made immutable. We are now keeping one immutable
115 metaclass instance per metaclass instead of just one
116 to prevent isa hierarchy corruption. Memory use will go
117 up, but I suspect it will be neglible.
118 - New tests added for this behavior. (groditi)
7c90a1a8 119
c0fcd6ab 1200.38 Thurs. May 31, 2007
823a5d31 121 ~~ More documentation updates ~~
c81de280 122
823a5d31 123 * Class::MOP::Package
124 - we now deal with stub methods properly
125 - added tests for this
c0fcd6ab 126 - fixed some tests failing on 5.9.5 (thanks blblack)
c81de280 127
b25109b1 128 * Class::MOP::Attribute
129 - added get_read_method and get_write_method
c81de280 130 thanks to groditi for this code, tests
131 and docs.
b25109b1 132 - added tests and POD for this
795a0c8b 133
134 * Class::MOP::Class
135 - fixed RT issue #27329, clone object now
136 handles undef values correctly.
137 - added tests for this
d4ba1677 138 - Corrected anon-class handling so that they
139 will not get reaped when instances still
140 exist which need to reference them. This is
141 the correct behavior, hopefully this is an
142 obscure enough feature that there are not too
143 many work arounds out in the wild.
144 - added tests for this by groditi
95514cb4 145 - updated docs to explain this
146
147 * metaclass
c0fcd6ab 148 - load custom metaclasses automatically (thanks groditi)
f2266181 149 - added tests for this behavior
a06797b0 150
3dc99d93 1510.37 Sat. March 10, 2007
448b6e55 152 ~~ Many, many documentation updates ~~
153
154 * Class::MOP
155 - added &load_class and &is_class_loaded
156 - added tests and docs for these
2367814a 157
9363ea89 158 * Class::MOP::Attribute
159 - default now checks the instance with defined to
160 avoid setting off bool-overloads (found by Carl Franks)
161
c23184fc 1620.37_002
163 * /t
164 - bad name in a test, causing meaningless failuress.
165 No other changes.
166
1670.37_001
168
169 ~~ GLOBAL CHANGES ~~
170 - All attribute names are now consistent and follow Perl 6
171 style (prefixed with the sigil, and ! as the twigil for
172 private attrs). This should not affect any code, unless
173 you broke encapsulation, in which case, it is your problem
174 anyway.
175
176 !! Class::MOP::Class::Immutable has been removed
177
178 * Class::MOP::Method::Constructor
179 - this has been moved out of Class::MOP::Class::Immutable
180 and is a proper subclass of Class::MOP::Method now.
181
182 * Class::MOP::Class
183 - this module now uses Class::MOP::Immutable for the
184 immutable transformation instead of
185 Class::MOP::Class::Immutable.
186
187 + Class::MOP::Immutable
188 - this module now controls the transformation from a mutable
189 to an immutable version of the class. Docs for this will
190 be coming eventually.
191
192
cdc1ecba 1930.36 Sun. Nov. 5, 2006
a651e249 194 * Class::MOP::Class
195 - added a few 'no warnings' lines to keep annoying
196 (and meaningless) warnings from chirping during
197 global destruction.
0870928c 198
199 * Class::MOP
200 - some more bootstrapping is now done on the new
201 classes
202
203 * Class::MOP::Class::Immutable
204 *** API CHANGE ***
205 - constructor generation is now handled by
206 the Class::MOP::Method::Constructor class
207
208 * Class::MOP::Method::Constructor
209 - created this to handle constructor generation
210 in Class::MOP::Class::Immutable
211
212 * Class::MOP::Attribute
213 *** API CHANGE ***
214 - attributes now delegate to the
215 Class::MOP::Method::Accessor to generate
216 accessors
217
218 * Class::MOP::Method::Accessor
219 - all accessor generation functions from
220 Class::MOP::Attribute have been moved here
a651e249 221
80f00c79 2220.35 Sat. Sept. 30, 2006
8745cf22 223
224 * scripts/class_browser.pl
225 - initial prototype of a class browser, more
226 on this to come. Comments and patches are
227 very much welcome.
b1897d4d 228
229 * Class::MOP
3e86c902 230 - All Class::MOP::* accessors are no longer
231 re-generated in the bootstrap, instead
6d2118a4 232 they are aliased from the originals
6d2118a4 233 - fixed tests to reflect
b1897d4d 234 - added Class::MOP::Method (and its subclasses)
235 to the bootstrap
236 - adjusted tests for this
86482605 237 - added the Class::MOP::Instance attributes
238 to the bootstrap
b1897d4d 239
240 * Class::MOP::Method
241 *** API CHANGE ***
242 - methods are no longer blessed CODE refs
243 but are actual objects which can be CODE-ified
244 - adjusted tests to compensate
86482605 245 - adjusted docs for this
b1897d4d 246
247 * Class::MOP::Class
248 - changed how methods are dealt with to
249 encapsulate most of the work into the
250 &get_method_map method
251 - made several adjustments for the change
252 in Class::MOP::Method
253 - &add_attribute now checks if you are adding
254 a duplicate name, and properly removes the
255 old one before installing the new one
256 - added tests for this
86482605 257 - adjusted docs for this
b1897d4d 258
259 * Class::MOP::Class::Immutable
260 - added caching of &get_method_map
261 - fixed issue with &get_package_symbol
262 - cleaned up the methods that die (patch by David Wheeler)
263
264 * Class::MOP::Package
265 - added filtering capabilities to
266 &list_all_package_symbols
267
a549ce50 2680.34 Sat. Aug. 26, 2006
c4260b45 269 * Class::MOP::Class
270 - added the %:methods attribute, which like
271 the $:version and such just actually goes
272 to the symbol table to get it's stuff.
273 However, it makes the MOP more complete.
88dd563c 274 ** API CHANGE **
275 - The &create method now requires that all
276 but the package name now is passed in as
277 named parameters. See docs for more info.
278 - updated docs and tests for this
c4260b45 279
280 * Class::MOP::Object
281 - added &dump method to easily Data::Dumper
282 an object
283
284 * Class::MOP
285 - cleaned up the initialization of attributes
286 which do not store things in the instance
287 - added the %:methods attribute definition to
288 the bootstrap
88dd563c 289
290 ~ lots of misc. test cleanup
c4260b45 291
56e8dd5d 2920.33 Sat. Aug. 19, 2006
be7677c7 293 * Class::MOP::Class
294 - moved the metaclass cache out of here
295 and it is now in Class::MOP itself.
56e8dd5d 296
297 * Class::MOP
298 - moved all the metaclass cache stuff here
299 - fixed all tests for this
be7677c7 300
148b4697 301 * Class::MOP::Attribute
302 - reference values (other than CODE refs)
303 are no longer allowed for defaults
304 - added tests for this
56dcfc1a 305
306 * Class::MOP::Package
307 - fixed an issue with perl 5.8.1 and how it deals
e3a2c885 308 with symbol tables. The namespace hash is now
309 always reloaded from the symbol table.
310
311 ~ lots of misc. documentation cleanup
1396f86b 312
716c5765 3130.32 Sat. Aug. 12, 2006
6e57504d 314 + added Class::MOP::Object so that the
315 metamodel is more complete (and closer
316 to what Perl 6 will probably be).
317
9ca19585 318 * Class::MOP::Package
319 - refactored entire class, this is now
320 the primary gateway between the metaclass
321 and the Perl 5 symbol table
322 - added many tests for this
6e57504d 323 - this class is now a subclass of
324 Class::MOP::Object
716c5765 325 - added some tests to reflect this
9ca19585 326
327 * Class::MOP::Class
328 - refactored all symbol table access to
329 use Class::MOP::Package methods instead
f0480c45 330
331 * Class::MOP::Module
332 - adding the $:version attribute in the bootstrap
333 so that Module has a version as an attribute
334 - see comment in Class::MOP for details
335 - added the $:authority attribute to this module
336 as well as an &identifier method, to bring us
337 ever closer to Perl 6 goodness
716c5765 338 - I have added $AUTHORITY to all the modules
339 - added tests for this
9ca19585 340
f0480c45 341 * Class::MOP::Instance
342 - added &deinitialize_slot for removing slots
343 from an instance
344 - added tests for this
9ca19585 345
346 * Class::MOP::Attribute
347 - added support for &deinitialize_slot for removing
348 slots from an instance
349 - added tests for this
350
1a09d9cc 3510.31 Sat. July 15, 2006
352
b679e644 353 * Class::MOP::Class
354 - added &find_method_by_name to locate a method
355 anywhere within the class hierarchy
356
357 * Class::MOP::Attribute
358 - added &set_value and &get_value for getting
359 the value of the attribute for a particular
360 instance.
361
373a16ae 3620.30 Wed. July 5, 2006
363 ---------------------------------------
364 This is the first version of Class::MOP
365 to introduce the immutable features which
366 will be used for optimizating the MOP.
367 This support should still be considered
368 experimental, but moving towards stability.
369 ---------------------------------------
e0a82090 370
373a16ae 371 * Created Class::MOP::Class::Immutable
be960ba1 372
373a16ae 373 * Created the Class::MOP::Package and
374 Class::MOP::Module classes to more
375 closely conform to Perl 6's meta-model
e0a82090 376
377 * Class::MOP::Class
378 - now inherits from Class::MOP::Module
379 - several methods moved to ::Module and
380 ::Package and now inherited
381 - added tests for this
c0cbf4d9 382
383 * Class::MOP::Instance
384 - added an is_inlinable method to allow other
385 classes to check before they attempt to optimize.
be960ba1 386 - added an inline_create_instance to inline
387 instance creation (of course)
388
2ba153a9 389 ** API CHANGE **
390 - the Class::MOP::Class::*_package_variable
391 methods are all now methods of Class::MOP::Package
392 and called *_package_symbol instead. This is
393 because they are now more general purpose symbol
394 table manipulation methods.
e0a82090 395
cdfaa4cc 3960.29_02 Thurs. June 22, 2006
397 ++ DEVELOPER RELEASE ++
df7b4119 398 * Class::MOP::Class
399 - small change in &create so that it behaves
400 properly when inherited
cdfaa4cc 401 - small fix to &clone_instance
df7b4119 402
667cecf3 4030.29_01 Fri. May 12, 2006
404 ++ DEVELOPER RELEASE ++
405 - This release works in combination with
406 Moose 0.09_01, it is a developer release
407 because it introduces a new instance
408 sub-protocol and has not yet been
409 optimized.
410
40483095 411 * Class::MOP::Class
412 - anon-classes are now properly garbage collected
413 - added tests for this
195f5bf8 414 - improved method modifier wrapping
40483095 415
2bab2be6 416 * Class::MOP::Instance
1becdfcc 417 - added new instance protocol
2bab2be6 418 - added tests for this
419 - changed all relevant modules and examples
420 - Class::MOP::Class
421 - Class::MOP::Attribute
422 - examples/*
423
1becdfcc 424 * metaclass
425 - you no longer need to specify the metaclass
426 itself, if it is not there, Class::MOP::Class
427 is just assumed
428 - updated tests for this
429
430 * examples/
431 - added ArrayBasedStorage example to show
432 instance storage using ARRAY refs instead of
433 HASH refs.
434 - added tests for this
435 - InsideOutClass is totally revised using the
436 new instance protocol
437 - added more tests for this
438
93b4e576 4390.26 Mon. April 24, 2006
e7f732e4 440 * Class::MOP::Class
441 - added find_attribute_by_name method
442 - added tests and docs for this
56a0b530 443 - some small optimizations
444
445 * Class::MOP::Attribute
446 - some small optimizations
e7f732e4 447
46666f33 4480.25 Thurs. April 20, 2006
587aca23 449 * Class::MOP::Class
450 - added create_anon_class for creating anonymous classes
451 - added tests for this
452 - added get_all_metaclasses, get_all_metaclass_names
453 and get_all_metaclass_instances method to allow
454 access to all the cached metaclass objects.
bd4e03f9 455 - attribute slot initialization is now the responsibility
456 of the attribute itself, and construct_instance now
457 delegates appropriately
458
459 * Class::MOP::Attribute
460 - attribute slot initialization is now the responsibility
461 of the attribute itself, so we added a method for it
462 called initialize_instance_slot
fed4cee7 463
464 * examples/
465 - adjusted all the examples to use the new attribute
466 initialize_instance_slot method
587aca23 467
1daaa2b2 4680.24 Tues. April 11, 2006
8c936afc 469 * Class::MOP::Class
470 - cleaned up how the before/after/around method
471 modifiers get named with Sub::Name
472
b9dfbf78 4730.23 Thurs. March 30, 2006
a977cf65 474 * Class::MOP::Class
475 - fixed the way attribute defaults are handled
476 during instance construction (bug found by chansen)
b9dfbf78 477
478 * Class::MOP::Attribute
479 - read-only accessors ('reader') will now die if
480 passed more than one argument (attempting to write
481 to them basically)
482 - added tests for this
483 - adjusted all /example files to comply
a977cf65 484
f9eba090 4850.22 Mon. March 20, 2006
0eff2c16 486 * Class::MOP::Class
487 - localized $@ in the *_package_variable functions
488 because otherwise, it does ugly things in Moose.
489 - added test case for this
490
1988e85e 4910.21 Wed. March 15, 2006
2f6d5412 492 * Class::MOP::Class
493 - fixed issue where metaclasses are reaped from
494 our cache in global destruction, and so are not
495 available in DESTORY calls
496
96ceced8 4970.20 Thurs. March 2, 2006
d3cb0d4a 498 - removed the dependency for Clone since
499 we no longer to deep-cloning by default.
a4258ffd 500
501 * Class::MOP::Method
96ceced8 502 - added &package_name, &name and
503 &fully_qualified_name methods, some of
a4258ffd 504 which were formerly private subs in
505 Class::MOP::Class
506
507 * Class::MOP::Method::Wrapped
508 - allows for a method to be wrapped with
509 before, after and around modifiers
510 - added tests and docs for this feature
d3cb0d4a 511
512 * Class::MOP::Class
58d75218 513 - improved &get_package_symbol
96ceced8 514 - &version and &superclasses now use it
a4258ffd 515 - methods are now blessed into Class::MOP::Method
516 whenever possible
a4258ffd 517 - added methods to install CLOS-style method modifiers
518 - &add_before_method_modifier
519 - &add_after_method_modifier
520 - &add_around_method_modifier
521 - added tests and docs for these
96ceced8 522 - added &find_next_method_by_name which finds the
523 equivalent of SUPER::method_name
d3cb0d4a 524
1c020571 5250.12 Thurs. Feb 23, 2006
d89c0fad 526 - reduced the dependency on B, no need to always
527 have the latest
528
1c020571 529 * examples/
530 - added docs to the C3 method dispatch order test
531 - fixed missing Algorithm::C3 dependency by making
532 the test skip if it is not installed
533
0dea7280 5340.11 Mon Feb. 20, 2006
f3f5bd34 535 * examples/
536 - added example of changing method dispatch order to C3
a27ae83f 537
538 * Class::MOP::Class
19d4b5b8 539 - changed how clone_instance behaves, it now only does a
540 shallow clone (see docs for more details)
a27ae83f 541 - added docs and tests
f3f5bd34 542
3bf7644b 5430.10 Tues Feb. 14, 2006
544 ** This release was mostly about writing more tests and
545 cleaning out old and dusty code, the MOP should now
546 be considered "ready to use".
547
22286063 548 - adding more tests to get coverage up a little higher,
549 mostly testing errors and edge cases.
550 - test coverage is now at 99%
aa448b16 551
552 * Class::MOP
553 - no longer optionally exports to UNIVERSAL::meta or
554 creates a custom metaclass generator, use the
555 metaclass pragma instead.
22286063 556
557 * Class::MOP::Class
558 - fixed a number of minor issues which came up in the
559 error/edge-case tests
560
561 * Class::MOP::Attribute
562 - fixed a number of minor issues which came up in the
563 error/edge-case tests
564
0b8eb325 565 * examples/
ea263060 566 - fixing the AttributesWithHistory example, it was broken.
663f8198 567
550d56db 5680.06 Thurs Feb. 9, 2006
677eb158 569 * metaclass
550d56db 570 - adding new metaclass pragma to make setting up the
677eb158 571 metaclass a little more straightforward
7b31baf4 572
573 * Class::MOP
574 - clean up bootstrapping to include more complete
575 attribute definitions for Class::MOP::Class and
576 Class::MOP::Attribute (accessors, readers, writers,
577 etc.) ... it is redundant, but is useful meta-info
578 to have around.
677eb158 579
99e5b7e8 580 * Class::MOP::Class
581 - fixing minor meta-circularity issue with &meta, it
582 is now more useful for subclasses
7b31baf4 583 - added &get_attribute_map as an accessor for the
584 hash of attribute meta objects
c9e77dbb 585 - &compute_all_applicable_attributes now just returns
586 the attribute meta-object, rather than the HASH ref
587 since all the same info can be gotten from the
588 attribute meta-object itself
589 - updated docs & tests to reflect
5f3c057a 590 - added &clone_instance method which does a deep clone
591 of the instance structure created by &construct_instance
592 - added docs & tests for this
550d56db 593 - added Clone as a dependency
5f3c057a 594 - added &new_object and &clone_object convience methods to
595 return blessed new or cloned instances
2a7575a6 596 - they handle Class::MOP::Class singletons correctly too
5f3c057a 597 - added docs & tests for this
2a7575a6 598 - cleaned up the &constuct_class_instance so that it behaves
599 more like &construct_instance (and managed the singletons too)
550d56db 600 - added the &check_metaclass_compatibility method to make sure
601 that metaclasses are upward and downward compatible.
602 - added tests and docs for this
5f3c057a 603
99e5b7e8 604 * examples/
605 - adjusting code to use the &Class::MOP::Class::meta
606 fix detailed above
677eb158 607 - adjusting code to use the metaclass pragma
99e5b7e8 608
aa9c883e 6090.05 Sat Feb. 4, 2006
2e41896e 610 * Class::MOP::Class
611 - added the &attribute_metaclass and &method_metaclass
351bd7d4 612 attributes which contain a metaclass name to use for
2e41896e 613 attributes/methods respectively
351bd7d4 614
615 * Class::MOP
616 - bootstrap additional attributes for Class::MOP::Class
2e41896e 617
618 * examples/
619 - adjusted the example code and tests to use the new
620 &attribute_metaclass feature of Class::MOP::Class
aa9c883e 621 - added new example:
622 - LazyClass
2e41896e 623
d7c2cbe3 6240.04 Fri Feb. 3, 2006
d6fbcd05 625 * Class::MOP::Class
626 - some documentation suggestions from #perl6
627
628 * Class::MOP::Attribute
629 - improved error messages
630
631 * examples/
632 - added new examples:
633 - AttributesWithHistory
d7c2cbe3 634 - ClassEncapsultedAttributes
343203ee 635
9ec169fe 6360.03 Fri Feb. 3, 2006
637 - converted to Module::Build instead of EU::MM
638
639 * Class::MOP::Attribute
640 - refactored method generation code
641 - attributes are now associated with class directly
642
f71f4295 643 * examples/
9ec169fe 644 - refactored the InsideOut example to take advantage
645 of the Class::MOP::Attribute refactoring
f71f4295 646 - changed example files to .pod files and hide thier
647 package names from PAUSE (I don't want to own these
648 namespaces really, they are just examples)
9ec169fe 649
a57c7fa2 6500.02 Thurs Feb. 2, 2006
651 - moving examples from t/lib/* to examples/*
652 - adding POD documentation to the examples
653
a2e85e6c 6540.01 Thurs Feb. 2, 2006
92af7fdf 655 - Initial release