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