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