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