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