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