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