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