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