complete re-organization of the test suite
[gitmo/Moose.git] / Changes
1 Revision history for Perl extension Moose
2
3 0.26
4     ~ Several doc updates/cleanup thanks to castaway ~
5
6     * Moose
7       - added all the meta classes to the immutable list and 
8         set it to inline the accessors
9       - fix import to allow Sub::Exporter like { into => } 
10             and { into_level => } (perigrin)
11       - exposed and documented init_meta() to allow better 
12             embedding and extending of Moose (perigrin)
13             
14         * t/
15           - complete re-organization of the test suite
16
17     * Moose::Util::TypeConstraint
18       - no longer uses package variable to keep track of 
19         the type constraints, now uses the an instance of
20         Moose::Meta::TypeConstraint::Registry to do it
21
22     * Moose::Meta::TypeConstraint
23       - some minor adjustments to make subclassing easier
24       - added the package_defined_in attribute so that we 
25         can track where the type constraints are created
26       
27     * Moose::Meta::TypeConstraint::Union
28       - this is not a subclass of Moose::Meta::TypeConstraint      
29         which is more correct
30       
31     * Moose::Meta::TypeConstraint::Container
32       - added this module (taken from MooseX::AttributeHelpers)
33         to help construct nested collection types
34         - added tests for this
35     
36     * Moose::Meta::TypeConstraint::Registry
37       - added this class to keep track of type constraints
38     
39     * Moose::Meta::Attribute
40       Moose::Meta::Method::Constructor
41       Moose::Meta::Method::Accessor
42       - fixed issue with overload::Overloaded getting called 
43         on non-blessed items.
44         - added tests for this
45     
46     * Moose::Coookbook::Snacks
47       - these are bits of documentation, not quite as big as 
48         Recipes but which have no clear place in the module docs. 
49         So they are Snacks! (horray for castaway++)
50
51 0.25 Mon. Aug. 13, 2007
52     * Moose
53       - Documentation update to reference Moose::Util::TypeConstraints 
54         under 'isa' in 'has' for how to define a new type 
55         (thanks to shlomif).
56
57     * Moose::Meta::Attribute
58       - required attributes now will no longer accept undef 
59         from the constructor, even if there is a default and lazy
60         - added tests for this
61       - default subroutines must return a value which passes the 
62         type constraint
63         - added tests for this
64     
65     * Moose::Meta::Attribute
66     * Moose::Meta::Method::Constructor
67     * Moose::Meta::Method::Accessor        
68       - type-constraint tests now handle overloaded objects correctly
69         in the error message
70         - added tests for this (thanks to EvanCarroll) 
71
72     * Moose::Meta::TypeConstraint::Union
73       - added (has_)hand_optimized_constraint to this class so that 
74         it behaves as the regular Moose::Meta::TypeConstraint does.
75
76     * Moose::Meta::Role
77       - large refactoring of this code
78       - added several more tests 
79         - tests for subtle conflict resolition issues 
80           added, but not currently running
81           (thanks to kolibre)
82
83     * Moose::Cookbook::Recipe7 
84       - added new recipe for augment/inner functionality 
85         (still in progress)
86         - added test for this
87
88     * Moose::Spec::Role
89       - a formal definition of roles (still in progress)
90
91     * Moose::Util
92       - utilities for easier working with Moose classes
93         - added tests for these
94
95     * Test::Moose
96       - This contains Moose specific test functions
97         - added tests for these
98
99 0.24 Tues. July 3, 2007
100     ~ Some doc updates/cleanup ~
101
102     * Moose::Meta::Attribute
103       - added support for roles to be given as parameters 
104         to the 'handles' option.
105         - added tests and docs for this
106       - the has '+foo' attribute form now accepts changes to 
107         the lazy option, and the addition of a handles option
108         (but not changing the handles option)
109         - added tests and docs for this
110
111     * Moose::Meta::Role
112       - required methods are now fetched using find_method_by_name
113         so that required methods can come from superclasses
114         - adjusted tests for this
115
116 0.23 Mon. June 18, 2007
117     * Moose::Meta::Method::Constructor
118       - fix inlined constructor for hierarchy with multiple BUILD methods (mst)
119     * Moose::Meta::Class
120       - Modify make_immutable to work with the new Class::MOP immutable
121         mechanism + POD + very basic test (groditi)
122     * Moose::Meta::Attribute
123       - Fix handles to use goto() so that caller() comes out properly on 
124         the other side (perigrin)
125
126 0.22 Thurs. May 31, 2007
127     * Moose::Util::TypeConstraints
128       - fix for prototype undeclared issue when Moose::Util::TypeConstraints 
129         loaded before consumers (e.g. Moose::Meta::Attribute) by predeclaring
130         prototypes for functions
131       - added the ClassName type constraint, this checks for strings 
132         which will respond true to ->isa(UNIVERSAL). 
133         - added tests and docs for this
134       - subtyping just in name now works correctly by making the 
135         default for where be { 1 }
136         - added test for this 
137
138     * Moose::Meta::Method::Accessor
139       - coerce and lazy now work together correctly, thanks to 
140         merlyn for finding this bug
141         - tests added for this
142       - fix reader presedence bug in Moose::Meta::Attribute + tests
143
144     * Moose::Object
145       - Foo->new(undef) now gets ignored, it is assumed you meant to pass
146         a HASH-ref and missed. This produces better error messages then 
147         having it die cause undef is not a HASH.
148         - added tests for this
149
150 0.21 Thursday, May 2nd, 2007
151     * Moose
152       - added SUPER_SLOT and INNER_SLOT class hashes to support unimport
153       - modified unimport to remove super and inner along with the rest
154         - altered unimport tests to handle this
155
156     * Moose::Role
157       - altered super export to populate SUPER_SLOT
158
159     * Moose::Meta::Class
160       - altered augment and override modifier application to use *_SLOT
161         - modified tests for these to unimport one test class each to test
162
163     * Moose::Meta::Role
164       - fixed issue where custom attribute metaclasses
165         where not handled correctly in roles
166         - added tests for this
167     
168     * Moose::Meta::Class
169       - fixed issue where extending metaclasses with 
170         roles would blow up. Thanks to Aankhen`` for
171         finding this insidious error, and it's solution.
172         
173     ~~ lots of spelling and grammer fixes in the docs, 
174        many many thanks to rlb3 and Aankhen for these :)
175
176 0.20 Friday, April 6th, 2007
177     >> I messed up the SKIP logic in one test
178        so this release is just to fix that.
179
180     * Moose
181       - 'has' now also accepts an ARRAY ref
182         to create multiple attrs (see docs)
183         (thanks to konobi for this)
184          - added tests and docs 
185
186 0.19 Thurs. April 5th, 2007
187     ~~ More documentation updates ~~
188
189     * Moose::Util::TypeConstraints
190       - 'type' now supports messages as well
191         thanks to phaylon for finding this
192         - added tests for this
193       - added &list_all_type_constraints and 
194         &list_all_builtin_type_constraints
195         functions to facilitate introspection.
196     
197     * Moose::Meta::Attribute
198       - fixed regexp 'handles' declarations 
199         to build the list of delegated methods
200         correctly (and not override important 
201         things like &new) thanks to ashleyb 
202         for finding this
203         - added tests and docs for this
204       - added the 'documentation' attributes
205         so that you can actually document your 
206         attributes and inspect them through the 
207         meta-object.
208         - added tests and docs for this
209
210     * Moose::Meta::Class
211       - when loading custom attribute metaclasses
212         it will first look in for the class in the 
213         Moose::Meta::Attribute::Custom::$name, and 
214         then default to just loading $name.
215         - added tests and docs for this
216
217     * Moose::Meta::TypeConstraint
218       - type constraints now stringify to their names.
219         - added test for this
220
221     * misc.
222       - added tests to assure we work with Module::Refresh 
223       - added stricter test skip logic in the Moose POOP 
224         test, ask Rob Kinyon why.
225         - *cough* DBM::Deep 1.0 backwards compatability sucks *cough* ;)
226
227 0.18 Sat. March 10, 2007
228     ~~ Many, many documentation updates ~~
229
230     * misc.
231       - We now use Class::MOP::load_class to 
232         load all classes.    
233       - added tests to show types and subtypes 
234         working with Declare::Constraints::Simple
235         and Test::Deep as constraint engines.
236
237 0.18_001
238     !! You must have Class::MOP 0.37_001  !!
239     !! for this developer release to work !!
240
241     This release was primarily adding the immutable
242     feature to Moose. An immutable class is one which 
243     you promise not to alter. When you set the class 
244     as immutable it will perform various bits of 
245     memoization and inline certain part of the code
246     (constructors, destructors and accessors). This 
247     minimizes (and in some cases totally eliminates)
248     one of Moose's biggest performance hits. This 
249     feature is not on by default, and is 100% optional.
250     It has several configurable bits as well, so you 
251     can pick and choose to your specific needs.
252     
253     The changes involved in this were fairly wide and 
254     highly specific, but 100% backwards compatible, so 
255     I am not going to enumerate them here. If you are 
256     truely interested in what was changed, please do 
257     a diff :)
258
259 0.17 Tues. Nov. 14, 2006
260     * Moose::Meta::Method::Accessor
261       - bugfix for read-only accessors which 
262         are have a type constraint and lazy.
263         Thanks to chansen for finding it.
264
265 0.16 Tues. Nov. 14, 2006
266     ++ NOTE ++
267     There are some speed improvements in this release, 
268     but they are only the begining, so stay tuned.
269     
270     * Moose::Object
271       - BUILDALL and DEMOLISHALL no longer get 
272         called unless they actually need to be.
273         This gave us a signifigant speed boost
274         for the cases when there is no BUILD or 
275         DEMOLISH method present.
276         
277     * Moose::Util::TypeConstraints
278     * Moose::Meta::TypeConstraint
279       - added an 'optimize_as' option to the 
280         type constraint, which allows for a
281         hand optimized version of the type 
282         constraint to be used when possible.
283       - Any internally created type constraints
284         now provide an optimized version as well.
285
286 0.15 Sun. Nov. 5, 2006
287     ++ NOTE ++
288     This version of Moose *must* have Class::MOP 0.36 in order 
289     to work correctly. A number of small internal tweaks have 
290     been made in order to be compatible with that release.
291
292     * Moose::Util::TypeConstraints
293       - added &unimport so that you can clean out 
294         your class namespace of these exported 
295         keywords
296     
297     * Moose::Meta::Class
298       - fixed minor issue which occasionally 
299         comes up during global destruction 
300         (thanks omega)
301       - moved Moose::Meta::Method::Overriden into 
302         its own file.
303       
304     * Moose::Meta::Role      
305       - moved Moose::Meta::Role::Method into 
306         its own file.
307               
308     * Moose::Meta::Attribute
309       - changed how we do type checks so that 
310         we reduce the overall cost, but still 
311         retain correctness.
312        *** API CHANGE ***
313       - moved accessor generation methods to 
314         Moose::Meta::Method::Accessor to 
315         conform to the API changes from 
316         Class::MOP 0.36
317           
318     * Moose::Meta::TypeConstraint
319       - changed how constraints are compiled
320         so that we do less recursion and more
321         iteration. This makes the type check 
322         faster :)
323       - moved Moose::Meta::TypeConstraint::Union
324         into its own file
325     
326     * Moose::Meta::Method::Accessor
327       - created this from methods formerly found in 
328         Moose::Meta::Attribute
329     
330     * Moose::Meta::Role::Method
331       - moved this from Moose::Meta::Role
332           
333     * Moose::Meta::Method::Overriden
334       - moved this from Moose::Meta::Class
335       
336     * Moose::Meta::TypeConstraint::Union
337       - moved this from Moose::Meta::TypeConstraint
338
339 0.14 Mon. Oct. 9, 2006
340
341     * Moose::Meta::Attribute
342       - fixed lazy attributes which were not getting 
343         checked with the type constraint (thanks ashley)
344         - added tests for this
345       - removed the over-enthusiastic DWIMery of the 
346         automatic ArrayRef and HashRef defaults, it 
347         broke predicates in an ugly way.
348         - removed tests for this
349
350 0.13 Sat. Sept. 30, 2006
351     ++ NOTE ++
352     This version of Moose *must* have Class::MOP 0.35 in order 
353     to work correctly. A number of small internal tweaks have 
354     been made in order to be compatible with that release.
355
356     * Moose
357       - Removed the use of UNIVERSAL::require to be a better
358         symbol table citizen and remove a dependency 
359         (thanks Adam Kennedy)
360
361       **~~ removed experimental & undocumented feature ~~**
362       - commented out the 'method' and 'self' keywords, see the 
363         comments for more info.
364
365     * Moose::Cookbook
366       - added a FAQ and WTF files to document frequently 
367         asked questions and common problems
368         
369     * Moose::Util::TypeConstraints
370       - added GlobRef and FileHandle type constraint
371         - added tests for this
372         
373     * Moose::Meta::Attribute
374       - if your attribute 'isa' ArrayRef of HashRef, and you have
375         not explicitly set a default, then make the default DWIM.
376         This will also work for subtypes of ArrayRef and HashRef 
377         as well.
378       - you can now auto-deref subtypes of ArrayRef or HashRef too.
379         - new test added for this (thanks to ashley)
380         
381     * Moose::Meta::Role
382       - added basic support for runtime role composition
383         but this is still *highly experimental*, so feedback 
384         is much appreciated :)
385         - added tests for this
386
387     * Moose::Meta::TypeConstraint
388       - the type constraint now handles the coercion process
389         through delegation, this is to support the coercion 
390         of unions
391         
392     * Moose::Meta::TypeConstraint::Union
393       - it is now possible for coercions to be performed 
394         on a type union
395         - added tests for this (thanks to konobi)
396
397     * Moose::Meta::TypeCoercion
398       - properly capturing error when type constraint 
399         is not found
400
401     * Build.PL
402       - Scalar::Util 1.18 is bad on Win32, so temporarily
403         only require version 1.17 for Win32 and cygwin.
404         (thanks Adam Kennedy)        
405
406 0.12 Sat. Sept. 1, 2006
407     * Moose::Cookbook
408       - Recipe5 (subtypes & coercion) has been written
409       
410     * Moose
411       - fixed "bad meta" error message to be more descriptive      
412       - fixed &unimport to not remove the &inner and &super  
413         keywords because we need to localize them.
414       - fixed number of spelling/grammer issues, thanks Theory :)
415       
416       **~~ experimental & undocumented feature ~~**
417       - added the method and self keywords, they are basically 
418         just sugar, and they may not stay around.
419         
420     * Moose::Object
421       - added &dump method to easily Data::Dumper 
422         an object
423         
424     * Moose::Meta::TypeConstraint
425       - added the &is_a_type_of method to check both the current
426         and the subtype of a method (similar to &isa with classes)
427
428     * Moose::Meta::Role
429       - this is now a subclass of Class::MOP::Module, and no longer
430         creates the _role_meta ugliness of before. 
431         - fixed tests to reflect this change
432     
433 0.11 Wed. July 12, 2006
434     * Moose
435       - added an &unimport method to remove all the keywords
436         that Moose will import, simply add 'no Moose' to the 
437         bottom of your class file. 
438         
439     * t/
440       - fixed some test failures caused by a forgotten test 
441         dependency.
442
443 0.10 Thurs. July 6, 2006
444     * Moose
445       - improved error message when loading modules so
446         it is less confusing when you load a role.
447       - added &calculate_all_roles method to 
448         Moose::Meta::Class and Moose::Meta::Role
449         
450     NOTE:
451     This module has been tested against Class::MOP 0.30
452     but it does not yet utilize the optimizations 
453     it makes available. Stay tuned for that ;)
454     
455 0.09_03 Fri. June 23, 2006
456     ++ DEVELOPER RELEASE ++
457     * Moose
458       - 'use strict' and 'use warnings' are no longer
459          needed in Moose classes, Moose itself will 
460          turn them on for you.
461          - added tests for this
462       - moved code from exported subs to private methods
463         in Moose::Meta::Class
464          
465     * Moose::Role
466       - as with Moose, strict and warnings are 
467         automatically turned on for you.
468          - added tests for this        
469         
470     * Moose::Meta::Role
471       - now handles an edge case for override errors
472         - added tests for this
473       - added some more edge case tests
474
475 0.09_02 Tues. May 16, 2006
476     ++ DEVELOPER RELEASE ++
477     * Moose
478       - added prototypes to the exported subs
479       - updated docs
480       
481     * Moose::Role
482       - added prototypes to the exported subs      
483       - updated docs
484       
485     * Moose::Util::TypeConstraints
486       - cleaned up prototypes for the subs      
487       - updated docs      
488
489 0.09_01 Fri. May 12, 2006
490     ++ DEVELOPER RELEASE ++
491       - This release works in combination with 
492         Class::MOP 0.29_01, it is a developer 
493         release because it uses the a new 
494         instance sub-protocol and a fairly
495         complete Role implementation. It has 
496         not yet been optimized, so it slower
497         the the previous CPAN version. This 
498         release also lacks good updated docs, 
499         the official release will have updated docs.
500
501     * Moose 
502       - refactored the keyword exports
503         - 'with' now checks Role validaity and 
504           accepts more than one Role at a time
505         - 'extends' makes metaclass adjustments as 
506            needed to ensure metaclass compatability
507           
508     * Moose::Role
509       - refactored the keyword exports
510         - 'with' now checks Role validaity and 
511           accepts more than one Role at a time
512           
513     * Moose::Util::TypeConstraints
514       - added the 'enum' keyword for simple 
515         string enumerations which can be used as 
516         type constraints
517         - see example of usage in t/202_example.t
518         
519     * Moose::Object
520       - more careful checking of params to new()
521       
522     * Moose::Meta::Role
523       - much work done on the role composition
524         - many new tests for conflict detection 
525           and composition edge cases
526         - not enough documentation, I suggest 
527           looking at the tests    
528       
529     * Moose::Meta::Instance
530       - added new Instance metaclass to support 
531         the new Class::MOP instance protocol
532         
533     * Moose::Meta::Class
534       - some small changes to support the new 
535         instance protocol
536       - some small additions to support Roles
537         
538     * Moose::Meta::Attribute
539       - some improvements to the accessor generation code
540         by nothingmuch
541       - some small changes to support the new 
542         instance protocol
543       - (still somewhat) experimental delegation support 
544         with the 'handles' option
545         - added several tests for this
546         - no docs for this yet
547
548 0.05 Thurs. April 27, 2006
549     * Moose
550       - keywords are now exported with Sub::Exporter
551         thanks to chansen for this commit
552       - has keyword now takes a 'metaclass' option 
553         to support custom attribute meta-classes 
554         on a per-attribute basis
555         - added tests for this  
556       - the 'has' keyword not accepts inherited slot
557         specifications (has '+foo'). This is still an 
558         experimental feature and probably not finished
559         see t/038_attribute_inherited_slot_specs.t for 
560         more details, or ask about it on #moose
561         - added tests for this
562         
563     * Moose::Role
564       - keywords are now exported with Sub::Exporter
565
566     * Moose::Utils::TypeConstraints
567       - reorganized the type constraint hierarchy, thanks
568         to nothingmuch and chansen for his help and advice 
569         on this
570         - added some tests for this
571       - keywords are now exported with Sub::Exporter
572         thanks to chansen for this commit
573
574     * Moose::Meta::Class
575       - due to changes in Class::MOP, we had to change
576         construct_instance (for the better)
577         
578     * Moose::Meta::Attribute
579       - due to changes in Class::MOP, we had to add the 
580         initialize_instance_slot method (it's a good thing)
581         
582     * Moose::Meta::TypeConstraint
583       - added type constraint unions 
584         - added tests for this
585       - added the is_subtype_of predicate method
586         - added tests for this
587
588 0.04 Sun. April 16th, 2006
589     * Moose::Role
590       - Roles can now consume other roles
591         - added tests for this
592       - Roles can specify required methods now with 
593         the requires() keyword
594         - added tests for this
595
596     * Moose::Meta::Role
597       - ripped out much of it's guts ,.. much cleaner now
598       - added required methods and correct handling of 
599         them in apply() for both classes and roles
600         - added tests for this
601       - no longer adds a does() method to consuming classes 
602         it relys on the one in Moose::Object
603       - added roles attribute and some methods to support 
604         roles consuming roles
605
606     * Moose::Meta::Attribute
607       - added support for triggers on attributes
608         - added tests for this
609       - added support for does option on an attribute 
610         - added tests for this
611         
612     * Moose::Meta::Class
613       - added support for attribute triggers in the 
614         object construction
615         - added tests for this
616     
617     * Moose
618       - Moose no longer creates a subtype for your class 
619         if a subtype of the same name already exists, this 
620         should DWIM in 99.9999% of all cases
621         
622     * Moose::Util::TypeConstraints
623       - fixed bug where incorrect subtype conflicts were 
624         being reported
625         - added test for this
626         
627     * Moose::Object
628       - this class can now be extended with 'use base' if
629         you need it, it properly loads the metaclass class now
630         - added test for this
631
632 0.03_02 Wed. April 12, 2006
633     * Moose
634       - you must now explictly use Moose::Util::TypeConstraints
635         it no longer gets exported for you automatically
636         
637     * Moose::Object
638       - new() now accepts hash-refs as well as key/value lists
639       - added does() method to check for Roles
640         - added tests for this
641
642     * Moose::Meta::Class
643       - added roles attribute along with the add_role() and 
644         does_role() methods
645         - added tests for this 
646
647     * Moose::Meta::Role
648       - now adds a does() method to consuming classes 
649         which tests the class's hierarchy for roles
650         - added tests for this
651
652 0.03_01 Mon. April 10, 2006
653     * Moose::Cookbook
654       - added new Role recipe (no content yet, only code)
655       
656     * Moose
657       - added 'with' keyword for Role support
658         - added test and docs for this
659       - fixed subtype quoting bug
660         - added test for this 
661
662     * Moose::Role
663       - Roles for Moose
664         - added test and docs
665
666     * Moose::Util::TypeConstraints
667       - added the message keyword to add custom
668         error messages to type constraints        
669       
670     * Moose::Meta::Role
671       - the meta role to support Moose::Role
672         - added tests and docs
673         
674     * Moose::Meta::Class
675       - moved a number of things from Moose.pm 
676         to here, they should have been here 
677         in the first place
678
679     * Moose::Meta::Attribute
680       - moved the attribute option macros here
681         instead of putting them in Moose.pm
682
683     * Moose::Meta::TypeConstraint
684       - added the message attributes and the 
685         validate method
686         - added tests and docs for this
687
688 0.03 Thurs. March 30, 2006
689     * Moose::Cookbook
690       - added the Moose::Cookbook with 5 recipes, 
691         describing all the stuff Moose can do.
692
693     * Moose
694       - fixed an issue with &extends super class loading
695         it now captures errors and deals with inline 
696         packages correctly (bug found by mst, solution 
697         stolen from alias)
698       - added super/override & inner/augment features
699         - added tests and docs for these
700     
701     * Moose::Object
702       - BUILDALL now takes a reference of the %params 
703         that are passed to &new, and passes that to 
704         each BUILD as well.
705         
706     * Moose::Util::TypeConstraints
707       - Type constraints now survive runtime reloading
708         - added test for this
709
710         * Moose::Meta::Class
711           - fixed the way attribute defaults are handled 
712             during instance construction (bug found by chansen)
713
714     * Moose::Meta::Attribute
715       - read-only attributes now actually enforce their
716         read-only-ness (this corrected in Class::MOP as 
717         well)
718
719 0.02 Tues. March 21, 2006
720     * Moose
721       - many more tests, fixing some bugs and  
722         edge cases
723       - &extends now loads the base module with
724         UNIVERSAL::require 
725         - added UNIVERSAL::require to the 
726           dependencies list
727       ** API CHANGES **
728       - each new Moose class will also create 
729         and register a subtype of Object which 
730         correspond to the new Moose class.      
731       - the 'isa' option in &has now only 
732         accepts strings, and will DWIM in 
733         almost all cases
734     
735     * Moose::Util::TypeConstraints
736       - added type coercion features
737         - added tests for this
738         - added support for this in attributes 
739           and instance construction
740       ** API CHANGES **
741       - type construction no longer creates a 
742         function, it registers the type instead.
743         - added several functions to get the 
744           registered types 
745
746     * Moose::Object
747       - BUILDALL and DEMOLISHALL were broken 
748         because of a mis-named hash key, Whoops :)
749     
750     * Moose::Meta::Attribute
751       - adding support for coercion in the
752         autogenerated accessors
753         
754     * Moose::Meta::Class
755       - adding support for coercion in the
756         instance construction  
757
758     * Moose::Meta::TypeConstraint
759     * Moose::Meta::TypeCoercion
760           - type constraints and coercions are now 
761             full fledges meta-objects
762
763 0.01 Wed. March 15, 2006
764     - Moooooooooooooooooose!!!