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