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