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