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