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