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