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