9db7dc3faa38be6cdd412b81cba57b015d7dfa23
[gitmo/Class-MOP.git] / Changes
1 Revision history for Perl extension Class-MOP.
2
3 0.53
4     * Class::MOP::Instance
5       - added get_all_slot_values method (Sartak)
6         - added tests for this (Sartak)
7         
8     * Class::MOP::Class
9       Class::MOP::Method::Constructor
10       Class::MOP::Attribute
11         - making init_arg accept an undefined value
12           to indicate that no constructor args can 
13           be passed (thanks to nothingmuch)
14           - added tests for this
15         - added attribute initializer attribute (rjbs)
16           
17     * Class::MOP.
18         - making this use the new init_arg => undef
19           feature instead of the silly hack from 
20           before (thanks to nothingmuch)
21
22 0.52 Tues. Jan. 22, 2008
23     * Class::MOP::Class
24       - fixed bug in rebless_instance 
25         (discovered by ash)
26
27     * Class::MOP::Method::Constructor
28       - removed assumptions about the existence of 
29         a &meta method
30
31 0.51 Mon. Jan. 14, 2008
32     ~~~ some misc. doc. fixes ~~~
33     ~~ updated copyright dates ~~
34     
35     * Class::MOP
36       - now sets the IS_RUNNING_ON_5_10 
37         constant so that we can take advantage
38         of some of the nice bits of 5.10
39     
40     * Class::MOP::Class
41       - uses the IS_RUNNING_ON_5_10 flag to 
42         optimize the &linearized_isa method 
43         and avoid the hack/check for circular
44         inheritence in &class_precedence_list 
45       - added rebless_instance method (Sartak)
46         - added tests for this
47     
48     * Class::MOP::Immutable 
49       - the immutable class now keeps track of 
50         the transformer which immutablized it
51
52     * Class::MOP::Instance
53       - added rebless_instance_structure method (Sartak)
54         - added tests for this
55
56 0.50 Fri. Dec. 21, 2007
57     * Class::MOP::Class
58       - fixed bug in immutable to make sure that 
59         transformation arguments are saved 
60         correctly (mst)
61         - added tests for this
62         
63     * Class::MOP::Immutable
64       - fixed a bug (see above)
65       
66     * Class::MOP::Attribute
67       - some doc updates
68
69 0.49 Fri. Dec. 14, 2007
70     !! Class::MOP now loads 2 x faster  !!
71     !! with XS speedups (thanks konobi) !!
72         
73     * Class::MOP
74       - removed the dependency on B
75       - added two XS functions (thanks konobi)
76         - get_code_info($code) which replaces all
77           the B fiddling we were doing with
78           faster/leaner XS level fiddling
79         - check_package_cache_flag($pkg_name) which 
80           returns the PL_sub_generation variable to 
81           be used to help manage method caching.
82           
83           NOTE: 
84           In 5.10 or greater this will actually 
85           use the mro::get_pkg_gen instead to give 
86           even more accurate caching information. 
87           blblack++ for that stuff :)
88           
89     * Class::MOP::Class
90       - added the &subclasses method (thanks rlb)
91       - added the update_package_cache_flag and 
92         reset_package_cache_flag which help keep 
93         track of when we need to re-fetch the 
94         method map. 
95       - Several small improvements to take advantage
96         of the new method map caching features
97
98 0.48 Mon. Nov. 26, 2007
99     * Class::MOP::Attribute
100       - fixed get_read/write_method to handle the 
101         HASH ref case, which makes the 
102         get_read/write_method_ref handle it too.
103         - added more tests for this
104
105 0.47 Sat. Nov. 24, 2007
106     * Class::MOP::Attribute
107       - fixed misspelling in get_write_method_ref
108         - added more tests for this
109
110 0.46 Fri. Nov. 23, 2007
111     * Class::MOP::Class
112       - added the linearized_isa method instead of constantly 
113         pruning duplicate classes (this will be even more 
114         useful in the 5.10-compat version coming soon)
115     
116     * Class::MOP::Attribute
117       - added the get_read_method_ref and get_write_method_ref
118         methods which allow you to retrieve a CODE ref which 
119         can always be used to read or write an attribute.
120
121 0.45 Thurs. Nov. 13, 2007
122     * Class::MOP::Attribute
123       - Fix error message on confess (groditi)
124
125 0.44 Thurs. Nov. 13, 2007
126     - Apparently I didn't make dist correctly (groditi)
127
128 0.43 Thurs. Nov. 13, 2007
129     * Class::MOP
130       - Add support for the 'builder' attribute (groditi)
131
132     * Class::MOP::Class
133       - optimise metaclass-already-exists check in 
134         construct_class_instance (groditi)
135       - duplicate check into initialize to save a 
136         call through (groditi)
137
138     * Class::MOP::Attribute
139       - Add support for the 'builder' attribute (groditi)
140       - Make predicates check for the existence of a value, not whether 
141         it is defined (groditi)
142
143     * Class::MOP::Instance
144       - Make predicates check for the existence of a value, not whether 
145         it is defined (groditi)
146
147     * Class::MOP::Method::Accessor 
148       - made this a subclass of Class::MOP::Method::Generated
149         - removed the relevant attributes
150
151     * Class::MOP::Method::Constructor
152       - fixed the cached values we had to be more sane
153       - made this a subclass of Class::MOP::Method::Generated
154       - fixed generated constructor so it properly handles 
155         subclasses now.
156         - added tests for this
157       - added the option to allow for both inlined and 
158         non-inlined constructors.
159       - Update inlined methods for builder and predicate changes (groditi)
160
161     * Class::MOP::Method::Generated
162       - added this class as an abstract base for the 
163         Class::MOP::Method::{Constructor,Accessor} classes
164         - added tests for this
165
166     *t/
167       - Alter tests (005, 014 020, 021) for new builder addition (groditi)
168       - Tests for new predicate behavior (and corrections to old tests) (groditi)
169
170     *examples/
171       - Update ArrayRef based class example to work with predicate changes
172
173 0.42 Mon. July 16, 2007
174     !!! Horray for mst, he fixed it !!!
175
176     * Class::MOP::Package
177       - alter symbol table handling to deal with 5.8.x and 5.9.x
178       
179     * t/
180       - Get rid of the crappy workaround from 0.40/41
181
182 0.41 Sun. July 15, 2007
183     * t/
184         Arghh!!! My TODO test didn't work, so I handle
185         it manually now so that people can use this 
186         with 5.9.5/bleadperl without issue.
187
188 0.40 Tues, July 3, 2007
189     * t/
190       ~ marked a test in 003_methods.t as TODO 
191         for perl 5.9.5 (this test is irrelvant to 
192         the module functioning on 5.9.5 for the most 
193         part anyway)
194
195 0.39 Mon. June 18, 2007
196     * Class::MOP::Immutable
197       - added make_metaclass_mutable + docs (groditi)
198       - removed unused variable
199       - added create_immutable_transformer
200         necessary for sane overloading of immutable behavior
201          - tests for this (groditi) 
202
203     * Class::MOP::Class
204       - Immutability can now be undone,
205         added make_mutable + tests + docs (groditi)
206       - Massive changes to the way Immutable is done
207         for details see comments next to make_immutable
208         This fixes a bug where custom metaclasses broke
209         when made immutable. We are now keeping one immutable 
210         metaclass instance per metaclass instead of just one 
211         to prevent isa hierarchy corruption. Memory use will go
212         up, but I suspect it will be neglible.
213          - New tests added for this behavior.  (groditi)
214
215 0.38 Thurs. May 31, 2007
216     ~~ More documentation updates ~~
217     
218     * Class::MOP::Package
219       - we now deal with stub methods properly
220         - added tests for this
221       - fixed some tests failing on 5.9.5 (thanks blblack)
222         
223     * Class::MOP::Attribute
224       - added get_read_method and get_write_method
225         thanks to groditi for this code, tests 
226         and docs.
227         - added tests and POD for this
228     
229     * Class::MOP::Class
230       - fixed RT issue #27329, clone object now 
231         handles undef values correctly.
232         - added tests for this
233       - Corrected anon-class handling so that they 
234         will not get reaped when instances still 
235         exist which need to reference them. This is 
236         the correct behavior, hopefully this is an 
237         obscure enough feature that there are not too 
238         many work arounds out in the wild.
239         - added tests for this by groditi   
240         - updated docs to explain this
241
242     * metaclass
243       - load custom metaclasses automatically (thanks groditi)
244         - added tests for this behavior
245
246 0.37 Sat. March 10, 2007
247     ~~ Many, many documentation updates ~~
248     
249     * Class::MOP
250       - added &load_class and &is_class_loaded 
251         - added tests and docs for these
252
253     * Class::MOP::Attribute
254       - default now checks the instance with defined to 
255         avoid setting off bool-overloads (found by Carl Franks)
256
257 0.37_002
258     * /t 
259       - bad name in a test, causing meaningless failuress. 
260         No other changes.
261
262 0.37_001
263     
264     ~~ GLOBAL CHANGES ~~
265     - All attribute names are now consistent and follow Perl 6 
266       style (prefixed with the sigil, and ! as the twigil for 
267       private attrs). This should not affect any code, unless 
268       you broke encapsulation, in which case, it is your problem 
269       anyway.
270       
271     !! Class::MOP::Class::Immutable has been removed
272     
273     * Class::MOP::Method::Constructor
274       - this has been moved out of Class::MOP::Class::Immutable 
275         and is a proper subclass of Class::MOP::Method now.
276         
277     * Class::MOP::Class
278       - this module now uses Class::MOP::Immutable for the 
279         immutable transformation instead of 
280         Class::MOP::Class::Immutable.
281         
282     + Class::MOP::Immutable 
283       - this module now controls the transformation from a mutable 
284         to an immutable version of the class. Docs for this will 
285         be coming eventually.
286     
287
288 0.36 Sun. Nov. 5, 2006
289     * Class::MOP::Class
290       - added a few 'no warnings' lines to keep annoying 
291         (and meaningless) warnings from chirping during 
292         global destruction.
293           
294     * Class::MOP
295       - some more bootstrapping is now done on the new 
296         classes
297     
298     * Class::MOP::Class::Immutable
299       *** API CHANGE ***    
300       - constructor generation is now handled by 
301         the Class::MOP::Method::Constructor class
302      
303     * Class::MOP::Method::Constructor
304       - created this to handle constructor generation 
305         in Class::MOP::Class::Immutable
306     
307     * Class::MOP::Attribute
308       *** API CHANGE ***    
309       - attributes now delegate to the 
310         Class::MOP::Method::Accessor to generate 
311         accessors
312     
313     * Class::MOP::Method::Accessor
314       - all accessor generation functions from 
315         Class::MOP::Attribute have been moved here
316
317 0.35 Sat. Sept. 30, 2006
318
319     * scripts/class_browser.pl
320       - initial prototype of a class browser, more 
321         on this to come. Comments and patches are 
322         very much welcome.
323
324     * Class::MOP
325       - All Class::MOP::* accessors are no longer 
326         re-generated in the bootstrap, instead 
327         they are aliased from the originals
328         - fixed tests to reflect
329       - added Class::MOP::Method (and its subclasses) 
330         to the bootstrap
331         - adjusted tests for this
332       - added the Class::MOP::Instance attributes
333         to the bootstrap
334     
335     * Class::MOP::Method
336       *** API CHANGE ***
337       - methods are no longer blessed CODE refs
338         but are actual objects which can be CODE-ified
339         - adjusted tests to compensate
340         - adjusted docs for this        
341
342     * Class::MOP::Class
343       - changed how methods are dealt with to 
344         encapsulate most of the work into the 
345         &get_method_map method
346       - made several adjustments for the change
347         in Class::MOP::Method
348       - &add_attribute now checks if you are adding 
349         a duplicate name, and properly removes the 
350         old one before installing the new one
351         - added tests for this
352         - adjusted docs for this
353     
354     * Class::MOP::Class::Immutable
355       - added caching of &get_method_map
356       - fixed issue with &get_package_symbol
357       - cleaned up the methods that die (patch by David Wheeler)
358     
359     * Class::MOP::Package
360       - added filtering capabilities to 
361         &list_all_package_symbols
362
363 0.34 Sat. Aug. 26, 2006
364     * Class::MOP::Class
365       - added the %:methods attribute, which like
366         the $:version and such just actually goes 
367         to the symbol table to get it's stuff. 
368         However, it makes the MOP more complete.
369      ** API CHANGE **
370       - The &create method now requires that all 
371         but the package name now is passed in as 
372         named parameters. See docs for more info.
373         - updated docs and tests for this
374         
375     * Class::MOP::Object
376       - added &dump method to easily Data::Dumper 
377         an object
378         
379     * Class::MOP
380       - cleaned up the initialization of attributes 
381         which do not store things in the instance 
382       - added the %:methods attribute definition to
383         the bootstrap
384         
385     ~ lots of misc. test cleanup
386
387 0.33 Sat. Aug. 19, 2006
388     * Class::MOP::Class
389       - moved the metaclass cache out of here 
390         and it is now in Class::MOP itself.
391         
392     * Class::MOP
393       - moved all the metaclass cache stuff here
394         - fixed all tests for this
395
396     * Class::MOP::Attribute
397       - reference values (other than CODE refs) 
398         are no longer allowed for defaults
399         - added tests for this
400     
401     * Class::MOP::Package
402       - fixed an issue with perl 5.8.1 and how it deals 
403         with symbol tables. The namespace hash is now 
404         always reloaded from the symbol table. 
405
406     ~ lots of misc. documentation cleanup
407
408 0.32 Sat. Aug. 12, 2006
409     + added Class::MOP::Object so that the 
410       metamodel is more complete (and closer
411       to what Perl 6 will probably be).
412
413     * Class::MOP::Package
414       - refactored entire class, this is now 
415         the primary gateway between the metaclass
416         and the Perl 5 symbol table
417         - added many tests for this
418       - this class is now a subclass of 
419         Class::MOP::Object
420         - added some tests to reflect this
421         
422     * Class::MOP::Class
423       - refactored all symbol table access to 
424         use Class::MOP::Package methods instead
425         
426     * Class::MOP::Module
427       - adding the $:version attribute in the bootstrap
428         so that Module has a version as an attribute
429         - see comment in Class::MOP for details
430       - added the $:authority attribute to this module 
431         as well as an &identifier method, to bring us 
432         ever closer to Perl 6 goodness 
433         - I have added $AUTHORITY to all the modules 
434         - added tests for this
435       
436     * Class::MOP::Instance
437       - added &deinitialize_slot for removing slots 
438         from an instance
439         - added tests for this      
440       
441     * Class::MOP::Attribute 
442       - added support for &deinitialize_slot for removing
443         slots from an instance
444         - added tests for this
445
446 0.31 Sat. July 15, 2006
447
448     * Class::MOP::Class
449       - added &find_method_by_name to locate a method
450         anywhere within the class hierarchy   
451         
452     * Class::MOP::Attribute
453       - added &set_value and &get_value for getting 
454         the value of the attribute for a particular 
455         instance.
456
457 0.30 Wed. July 5, 2006
458     ---------------------------------------
459     This is the first version of Class::MOP 
460     to introduce the immutable features which
461     will be used for optimizating the MOP. 
462     This support should still be considered
463     experimental, but moving towards stability.
464     ---------------------------------------
465     
466     * Created Class::MOP::Class::Immutable  
467     
468     * Created the Class::MOP::Package and 
469       Class::MOP::Module classes to more 
470       closely conform to Perl 6's meta-model
471
472     * Class::MOP::Class
473       - now inherits from Class::MOP::Module
474       - several methods moved to ::Module and 
475         ::Package and now inherited
476         - added tests for this
477       
478     * Class::MOP::Instance
479       - added an is_inlinable method to allow other 
480         classes to check before they attempt to optimize.
481       - added an inline_create_instance to inline 
482         instance creation (of course) 
483         
484     ** API CHANGE **
485       - the Class::MOP::Class::*_package_variable 
486         methods are all now methods of Class::MOP::Package
487         and called *_package_symbol instead. This is 
488         because they are now more general purpose symbol 
489         table manipulation methods.        
490
491 0.29_02 Thurs. June 22, 2006
492     ++ DEVELOPER RELEASE ++
493     * Class::MOP::Class
494       - small change in &create so that it behaves 
495         properly when inherited
496       - small fix to &clone_instance
497
498 0.29_01 Fri. May 12, 2006
499     ++ DEVELOPER RELEASE ++
500       - This release works in combination with 
501         Moose 0.09_01, it is a developer release
502         because it introduces a new instance 
503         sub-protocol and has not yet been 
504         optimized.  
505
506     * Class::MOP::Class
507       - anon-classes are now properly garbage collected
508         - added tests for this 
509       - improved method modifier wrapping 
510
511     * Class::MOP::Instance
512       - added new instance protocol
513         - added tests for this
514       - changed all relevant modules and examples
515         - Class::MOP::Class
516         - Class::MOP::Attribute
517         - examples/*
518
519     * metaclass
520       - you no longer need to specify the metaclass
521         itself, if it is not there, Class::MOP::Class
522         is just assumed
523         - updated tests for this
524
525     * examples/
526       - added ArrayBasedStorage example to show 
527         instance storage using ARRAY refs instead of
528         HASH refs. 
529         - added tests for this
530       - InsideOutClass is totally revised using the 
531         new instance protocol
532         - added more tests for this
533
534 0.26 Mon. April 24, 2006
535     * Class::MOP::Class
536       - added find_attribute_by_name method
537         - added tests and docs for this
538       - some small optimizations
539
540     * Class::MOP::Attribute
541       - some small optimizations
542
543 0.25 Thurs. April 20, 2006
544     * Class::MOP::Class
545       - added create_anon_class for creating anonymous classes
546         - added tests for this
547       - added get_all_metaclasses, get_all_metaclass_names
548         and get_all_metaclass_instances method to allow
549         access to all the cached metaclass objects.
550       - attribute slot initialization is now the responsibility
551         of the attribute itself, and construct_instance now 
552         delegates appropriately
553         
554     * Class::MOP::Attribute
555       - attribute slot initialization is now the responsibility
556         of the attribute itself, so we added a method for it
557         called initialize_instance_slot
558     
559     * examples/
560       - adjusted all the examples to use the new attribute 
561         initialize_instance_slot method 
562
563 0.24 Tues. April 11, 2006
564     * Class::MOP::Class
565       - cleaned up how the before/after/around method 
566         modifiers get named with Sub::Name
567
568 0.23 Thurs. March 30, 2006
569         * Class::MOP::Class
570           - fixed the way attribute defaults are handled 
571             during instance construction (bug found by chansen)
572             
573         * Class::MOP::Attribute
574           - read-only accessors ('reader') will now die if 
575             passed more than one argument (attempting to write
576             to them basically)
577               - added tests for this
578               - adjusted all /example files to comply 
579
580 0.22 Mon. March 20, 2006
581     * Class::MOP::Class
582       - localized $@ in the *_package_variable functions
583         because otherwise, it does ugly things in Moose.
584           - added test case for this
585
586 0.21 Wed. March 15, 2006
587     * Class::MOP::Class
588       - fixed issue where metaclasses are reaped from 
589         our cache in global destruction, and so are not
590         available in DESTORY calls
591
592 0.20 Thurs. March 2, 2006
593     - removed the dependency for Clone since 
594       we no longer to deep-cloning by default.
595     
596     * Class::MOP::Method
597       - added &package_name, &name and 
598         &fully_qualified_name methods, some of 
599         which were formerly private subs in 
600         Class::MOP::Class
601       
602     * Class::MOP::Method::Wrapped
603       - allows for a method to be wrapped with 
604         before, after and around modifiers 
605           - added tests and docs for this feature
606
607     * Class::MOP::Class
608       - improved &get_package_symbol
609           - &version and &superclasses now use it
610       - methods are now blessed into Class::MOP::Method
611         whenever possible
612       - added methods to install CLOS-style method modifiers 
613          - &add_before_method_modifier
614          - &add_after_method_modifier         
615          - &add_around_method_modifier
616              - added tests and docs for these
617       - added &find_next_method_by_name which finds the 
618         equivalent of SUPER::method_name
619
620 0.12 Thurs. Feb 23, 2006
621     - reduced the dependency on B, no need to always 
622       have the latest
623
624     * examples/
625       - added docs to the C3 method dispatch order test
626       - fixed missing Algorithm::C3 dependency by making 
627         the test skip if it is not installed
628
629 0.11 Mon Feb. 20, 2006
630     * examples/
631       - added example of changing method dispatch order to C3
632       
633     * Class::MOP::Class
634       - changed how clone_instance behaves, it now only does a
635         shallow clone (see docs for more details)
636         - added docs and tests
637
638 0.10 Tues Feb. 14, 2006
639     ** This release was mostly about writing more tests and 
640        cleaning out old and dusty code, the MOP should now 
641        be considered "ready to use".
642
643     - adding more tests to get coverage up a little higher,
644       mostly testing errors and edge cases.
645       - test coverage is now at 99%
646       
647     * Class::MOP
648       - no longer optionally exports to UNIVERSAL::meta or
649         creates a custom metaclass generator, use the 
650         metaclass pragma instead.
651
652     * Class::MOP::Class  
653       - fixed a number of minor issues which came up in the 
654         error/edge-case tests
655         
656     * Class::MOP::Attribute 
657       - fixed a number of minor issues which came up in the 
658         error/edge-case tests        
659      
660     * examples/
661       - fixing the AttributesWithHistory example, it was broken.
662
663 0.06 Thurs Feb. 9, 2006
664     * metaclass
665       - adding new metaclass pragma to make setting up the 
666         metaclass a little more straightforward
667         
668     * Class::MOP
669       - clean up bootstrapping to include more complete 
670         attribute definitions for Class::MOP::Class and 
671         Class::MOP::Attribute (accessors, readers, writers, 
672         etc.) ... it is redundant, but is useful meta-info
673         to have around.
674
675     * Class::MOP::Class
676       - fixing minor meta-circularity issue with &meta, it 
677         is now more useful for subclasses
678       - added &get_attribute_map as an accessor for the 
679         hash of attribute meta objects
680       - &compute_all_applicable_attributes now just returns
681         the attribute meta-object, rather than the HASH ref
682         since all the same info can be gotten from the 
683         attribute meta-object itself
684           - updated docs & tests to reflect
685       - added &clone_instance method which does a deep clone
686         of the instance structure created by &construct_instance
687           - added docs & tests for this
688           - added Clone as a dependency
689       - added &new_object and &clone_object convience methods to
690         return blessed new or cloned instances
691           - they handle Class::MOP::Class singletons correctly too
692           - added docs & tests for this
693       - cleaned up the &constuct_class_instance so that it behaves
694         more like &construct_instance (and managed the singletons too)
695       - added the &check_metaclass_compatibility method to make sure
696         that metaclasses are upward and downward compatible.
697           - added tests and docs for this
698           
699     * examples/
700       - adjusting code to use the &Class::MOP::Class::meta
701         fix detailed above
702       - adjusting code to use the metaclass pragma
703       
704 0.05 Sat Feb. 4, 2006
705     * Class::MOP::Class
706       - added the &attribute_metaclass and &method_metaclass
707         attributes which contain a metaclass name to use for 
708         attributes/methods respectively
709     
710     * Class::MOP
711       - bootstrap additional attributes for Class::MOP::Class 
712         
713     * examples/
714       - adjusted the example code and tests to use the new
715         &attribute_metaclass feature of Class::MOP::Class
716       - added new example:
717         - LazyClass
718
719 0.04 Fri Feb. 3, 2006
720     * Class::MOP::Class
721       - some documentation suggestions from #perl6
722     
723     * Class::MOP::Attribute
724       - improved error messages    
725     
726     * examples/
727       - added new examples:
728         - AttributesWithHistory
729         - ClassEncapsultedAttributes
730
731 0.03 Fri Feb. 3, 2006
732     - converted to Module::Build instead of EU::MM
733     
734     * Class::MOP::Attribute
735       - refactored method generation code
736       - attributes are now associated with class directly
737     
738     * examples/
739       - refactored the InsideOut example to take advantage 
740         of the Class::MOP::Attribute refactoring
741       - changed example files to .pod files and hide thier
742         package names from PAUSE (I don't want to own these
743         namespaces really, they are just examples)
744
745 0.02 Thurs Feb. 2, 2006
746     - moving examples from t/lib/* to examples/*
747         - adding POD documentation to the examples
748
749 0.01 Thurs Feb. 2, 2006
750     - Initial release