1 Revision history for Perl extension Moose
4 * fixing some misc. bits in the docs that
5 got mentioned on CPAN Forum
8 - fixed how required methods are handled
9 when they encounter overriden or modified
10 methods from a class (thanks to confound).
11 - added tests for this
13 * Moose::Util::TypeConstraint
14 - fixed the type notation parser so that
15 the | always creates a union and so is
16 no longer a valid type char (thanks to
17 konobi, mugwump and #moose for working
19 - added more tests for this
21 0.26 Thurs. Sept. 27, 2007
25 We now support parameterized collection types, such as:
26 ArrayRef[Int] # array or integers
27 HashRef[Object] # a hash with object values
28 They can also be nested:
29 ArrayRef[HashRef[RegExpr]] # an array of hashes with regexpr values
30 And work with the type unions as well:
31 ArrayRef[Int | Str] # array of integers of strings
33 * Better Framework Extendability
34 Moose.pm is now "extendable" such that it is now much
35 easier to extend the framework and add your own keywords
36 and customizations. See the "EXTENDING AND EMBEDDING MOOSE"
37 section of the Moose.pm docs.
40 In an effort to begin documenting some of the various
41 details of Moose as well as some common idioms, we have
42 created Moose::Cookbook::Snacks as a place to find
43 small (easily digestable) nuggets of Moose code.
46 ~ Several doc updates/cleanup thanks to castaway ~
48 - converted build system to use Module::Install instead of
49 Module::Build (thanks to jrockway)
52 - added all the meta classes to the immutable list and
53 set it to inline the accessors
54 - fix import to allow Sub::Exporter like { into => }
55 and { into_level => } (perigrin)
56 - exposed and documented init_meta() to allow better
57 embedding and extending of Moose (perigrin)
60 - complete re-organization of the test suite
61 - added some new tests as well
62 - finally re-enabled the Moose::POOP test since
63 the new version of DBM::Deep now works again
67 - fixed very odd and very nasty recursion bug with
69 - added tests for this (eilara)
71 * Moose::Meta::Attribute
72 Moose::Meta::Method::Constructor
73 Moose::Meta::Method::Accessor
74 - fixed issue with overload::Overloaded getting called
75 on non-blessed items. (RT #29269)
76 - added tests for this
78 * Moose::Meta::Method::Accessor
79 - fixed issue with generated accessor code making
80 assumptions about hash based classes (thanks to dexter)
82 * Moose::Coookbook::Snacks
83 - these are bits of documentation, not quite as big as
84 Recipes but which have no clear place in the module docs.
85 So they are Snacks! (horray for castaway++)
87 * Moose::Cookbook::Recipe4
88 - updated it to use the new ArrayRef[MyType] construct
89 - updated the accompanying test as well
91 +++ Major Refactor of the Type Constraint system +++
92 +++ with new features added as well +++
94 * Moose::Util::TypeConstraint
95 - no longer uses package variable to keep track of
96 the type constraints, now uses the an instance of
97 Moose::Meta::TypeConstraint::Registry to do it
98 - added more sophisticated type notation parsing
100 - added tests for this
102 * Moose::Meta::TypeConstraint
103 - some minor adjustments to make subclassing easier
104 - added the package_defined_in attribute so that we
105 can track where the type constraints are created
107 * Moose::Meta::TypeConstraint::Union
108 - this is now been refactored to be a subclass of
109 Moose::Meta::TypeConstraint
111 * Moose::Meta::TypeCoercion::Union
112 - this has been added to service the newly refactored
113 Moose::Meta::TypeConstraint::Union and is itself
114 a subclass of Moose::Meta::TypeCoercion
116 * Moose::Meta::TypeConstraint::Parameterized
117 - added this module (taken from MooseX::AttributeHelpers)
118 to help construct nested collection types
119 - added tests for this
121 * Moose::Meta::TypeConstraint::Registry
122 - added this class to keep track of type constraints
124 0.25 Mon. Aug. 13, 2007
126 - Documentation update to reference Moose::Util::TypeConstraints
127 under 'isa' in 'has' for how to define a new type
130 * Moose::Meta::Attribute
131 - required attributes now will no longer accept undef
132 from the constructor, even if there is a default and lazy
133 - added tests for this
134 - default subroutines must return a value which passes the
136 - added tests for this
138 * Moose::Meta::Attribute
139 * Moose::Meta::Method::Constructor
140 * Moose::Meta::Method::Accessor
141 - type-constraint tests now handle overloaded objects correctly
143 - added tests for this (thanks to EvanCarroll)
145 * Moose::Meta::TypeConstraint::Union
146 - added (has_)hand_optimized_constraint to this class so that
147 it behaves as the regular Moose::Meta::TypeConstraint does.
150 - large refactoring of this code
151 - added several more tests
152 - tests for subtle conflict resolition issues
153 added, but not currently running
156 * Moose::Cookbook::Recipe7
157 - added new recipe for augment/inner functionality
159 - added test for this
162 - a formal definition of roles (still in progress)
165 - utilities for easier working with Moose classes
166 - added tests for these
169 - This contains Moose specific test functions
170 - added tests for these
172 0.24 Tues. July 3, 2007
173 ~ Some doc updates/cleanup ~
175 * Moose::Meta::Attribute
176 - added support for roles to be given as parameters
177 to the 'handles' option.
178 - added tests and docs for this
179 - the has '+foo' attribute form now accepts changes to
180 the lazy option, and the addition of a handles option
181 (but not changing the handles option)
182 - added tests and docs for this
185 - required methods are now fetched using find_method_by_name
186 so that required methods can come from superclasses
187 - adjusted tests for this
189 0.23 Mon. June 18, 2007
190 * Moose::Meta::Method::Constructor
191 - fix inlined constructor for hierarchy with multiple BUILD methods (mst)
193 - Modify make_immutable to work with the new Class::MOP immutable
194 mechanism + POD + very basic test (groditi)
195 * Moose::Meta::Attribute
196 - Fix handles to use goto() so that caller() comes out properly on
197 the other side (perigrin)
199 0.22 Thurs. May 31, 2007
200 * Moose::Util::TypeConstraints
201 - fix for prototype undeclared issue when Moose::Util::TypeConstraints
202 loaded before consumers (e.g. Moose::Meta::Attribute) by predeclaring
203 prototypes for functions
204 - added the ClassName type constraint, this checks for strings
205 which will respond true to ->isa(UNIVERSAL).
206 - added tests and docs for this
207 - subtyping just in name now works correctly by making the
208 default for where be { 1 }
209 - added test for this
211 * Moose::Meta::Method::Accessor
212 - coerce and lazy now work together correctly, thanks to
213 merlyn for finding this bug
214 - tests added for this
215 - fix reader presedence bug in Moose::Meta::Attribute + tests
218 - Foo->new(undef) now gets ignored, it is assumed you meant to pass
219 a HASH-ref and missed. This produces better error messages then
220 having it die cause undef is not a HASH.
221 - added tests for this
223 0.21 Thursday, May 2nd, 2007
225 - added SUPER_SLOT and INNER_SLOT class hashes to support unimport
226 - modified unimport to remove super and inner along with the rest
227 - altered unimport tests to handle this
230 - altered super export to populate SUPER_SLOT
233 - altered augment and override modifier application to use *_SLOT
234 - modified tests for these to unimport one test class each to test
237 - fixed issue where custom attribute metaclasses
238 where not handled correctly in roles
239 - added tests for this
242 - fixed issue where extending metaclasses with
243 roles would blow up. Thanks to Aankhen`` for
244 finding this insidious error, and it's solution.
246 ~~ lots of spelling and grammer fixes in the docs,
247 many many thanks to rlb3 and Aankhen for these :)
249 0.20 Friday, April 6th, 2007
250 >> I messed up the SKIP logic in one test
251 so this release is just to fix that.
254 - 'has' now also accepts an ARRAY ref
255 to create multiple attrs (see docs)
256 (thanks to konobi for this)
257 - added tests and docs
259 0.19 Thurs. April 5th, 2007
260 ~~ More documentation updates ~~
262 * Moose::Util::TypeConstraints
263 - 'type' now supports messages as well
264 thanks to phaylon for finding this
265 - added tests for this
266 - added &list_all_type_constraints and
267 &list_all_builtin_type_constraints
268 functions to facilitate introspection.
270 * Moose::Meta::Attribute
271 - fixed regexp 'handles' declarations
272 to build the list of delegated methods
273 correctly (and not override important
274 things like &new) thanks to ashleyb
276 - added tests and docs for this
277 - added the 'documentation' attributes
278 so that you can actually document your
279 attributes and inspect them through the
281 - added tests and docs for this
284 - when loading custom attribute metaclasses
285 it will first look in for the class in the
286 Moose::Meta::Attribute::Custom::$name, and
287 then default to just loading $name.
288 - added tests and docs for this
290 * Moose::Meta::TypeConstraint
291 - type constraints now stringify to their names.
292 - added test for this
295 - added tests to assure we work with Module::Refresh
296 - added stricter test skip logic in the Moose POOP
297 test, ask Rob Kinyon why.
298 - *cough* DBM::Deep 1.0 backwards compatability sucks *cough* ;)
300 0.18 Sat. March 10, 2007
301 ~~ Many, many documentation updates ~~
304 - We now use Class::MOP::load_class to
306 - added tests to show types and subtypes
307 working with Declare::Constraints::Simple
308 and Test::Deep as constraint engines.
311 !! You must have Class::MOP 0.37_001 !!
312 !! for this developer release to work !!
314 This release was primarily adding the immutable
315 feature to Moose. An immutable class is one which
316 you promise not to alter. When you set the class
317 as immutable it will perform various bits of
318 memoization and inline certain part of the code
319 (constructors, destructors and accessors). This
320 minimizes (and in some cases totally eliminates)
321 one of Moose's biggest performance hits. This
322 feature is not on by default, and is 100% optional.
323 It has several configurable bits as well, so you
324 can pick and choose to your specific needs.
326 The changes involved in this were fairly wide and
327 highly specific, but 100% backwards compatible, so
328 I am not going to enumerate them here. If you are
329 truely interested in what was changed, please do
332 0.17 Tues. Nov. 14, 2006
333 * Moose::Meta::Method::Accessor
334 - bugfix for read-only accessors which
335 are have a type constraint and lazy.
336 Thanks to chansen for finding it.
338 0.16 Tues. Nov. 14, 2006
340 There are some speed improvements in this release,
341 but they are only the begining, so stay tuned.
344 - BUILDALL and DEMOLISHALL no longer get
345 called unless they actually need to be.
346 This gave us a signifigant speed boost
347 for the cases when there is no BUILD or
348 DEMOLISH method present.
350 * Moose::Util::TypeConstraints
351 * Moose::Meta::TypeConstraint
352 - added an 'optimize_as' option to the
353 type constraint, which allows for a
354 hand optimized version of the type
355 constraint to be used when possible.
356 - Any internally created type constraints
357 now provide an optimized version as well.
359 0.15 Sun. Nov. 5, 2006
361 This version of Moose *must* have Class::MOP 0.36 in order
362 to work correctly. A number of small internal tweaks have
363 been made in order to be compatible with that release.
365 * Moose::Util::TypeConstraints
366 - added &unimport so that you can clean out
367 your class namespace of these exported
371 - fixed minor issue which occasionally
372 comes up during global destruction
374 - moved Moose::Meta::Method::Overriden into
378 - moved Moose::Meta::Role::Method into
381 * Moose::Meta::Attribute
382 - changed how we do type checks so that
383 we reduce the overall cost, but still
386 - moved accessor generation methods to
387 Moose::Meta::Method::Accessor to
388 conform to the API changes from
391 * Moose::Meta::TypeConstraint
392 - changed how constraints are compiled
393 so that we do less recursion and more
394 iteration. This makes the type check
396 - moved Moose::Meta::TypeConstraint::Union
399 * Moose::Meta::Method::Accessor
400 - created this from methods formerly found in
401 Moose::Meta::Attribute
403 * Moose::Meta::Role::Method
404 - moved this from Moose::Meta::Role
406 * Moose::Meta::Method::Overriden
407 - moved this from Moose::Meta::Class
409 * Moose::Meta::TypeConstraint::Union
410 - moved this from Moose::Meta::TypeConstraint
412 0.14 Mon. Oct. 9, 2006
414 * Moose::Meta::Attribute
415 - fixed lazy attributes which were not getting
416 checked with the type constraint (thanks ashley)
417 - added tests for this
418 - removed the over-enthusiastic DWIMery of the
419 automatic ArrayRef and HashRef defaults, it
420 broke predicates in an ugly way.
421 - removed tests for this
423 0.13 Sat. Sept. 30, 2006
425 This version of Moose *must* have Class::MOP 0.35 in order
426 to work correctly. A number of small internal tweaks have
427 been made in order to be compatible with that release.
430 - Removed the use of UNIVERSAL::require to be a better
431 symbol table citizen and remove a dependency
432 (thanks Adam Kennedy)
434 **~~ removed experimental & undocumented feature ~~**
435 - commented out the 'method' and 'self' keywords, see the
436 comments for more info.
439 - added a FAQ and WTF files to document frequently
440 asked questions and common problems
442 * Moose::Util::TypeConstraints
443 - added GlobRef and FileHandle type constraint
444 - added tests for this
446 * Moose::Meta::Attribute
447 - if your attribute 'isa' ArrayRef of HashRef, and you have
448 not explicitly set a default, then make the default DWIM.
449 This will also work for subtypes of ArrayRef and HashRef
451 - you can now auto-deref subtypes of ArrayRef or HashRef too.
452 - new test added for this (thanks to ashley)
455 - added basic support for runtime role composition
456 but this is still *highly experimental*, so feedback
457 is much appreciated :)
458 - added tests for this
460 * Moose::Meta::TypeConstraint
461 - the type constraint now handles the coercion process
462 through delegation, this is to support the coercion
465 * Moose::Meta::TypeConstraint::Union
466 - it is now possible for coercions to be performed
468 - added tests for this (thanks to konobi)
470 * Moose::Meta::TypeCoercion
471 - properly capturing error when type constraint
475 - Scalar::Util 1.18 is bad on Win32, so temporarily
476 only require version 1.17 for Win32 and cygwin.
477 (thanks Adam Kennedy)
479 0.12 Sat. Sept. 1, 2006
481 - Recipe5 (subtypes & coercion) has been written
484 - fixed "bad meta" error message to be more descriptive
485 - fixed &unimport to not remove the &inner and &super
486 keywords because we need to localize them.
487 - fixed number of spelling/grammer issues, thanks Theory :)
489 **~~ experimental & undocumented feature ~~**
490 - added the method and self keywords, they are basically
491 just sugar, and they may not stay around.
494 - added &dump method to easily Data::Dumper
497 * Moose::Meta::TypeConstraint
498 - added the &is_a_type_of method to check both the current
499 and the subtype of a method (similar to &isa with classes)
502 - this is now a subclass of Class::MOP::Module, and no longer
503 creates the _role_meta ugliness of before.
504 - fixed tests to reflect this change
506 0.11 Wed. July 12, 2006
508 - added an &unimport method to remove all the keywords
509 that Moose will import, simply add 'no Moose' to the
510 bottom of your class file.
513 - fixed some test failures caused by a forgotten test
516 0.10 Thurs. July 6, 2006
518 - improved error message when loading modules so
519 it is less confusing when you load a role.
520 - added &calculate_all_roles method to
521 Moose::Meta::Class and Moose::Meta::Role
524 This module has been tested against Class::MOP 0.30
525 but it does not yet utilize the optimizations
526 it makes available. Stay tuned for that ;)
528 0.09_03 Fri. June 23, 2006
529 ++ DEVELOPER RELEASE ++
531 - 'use strict' and 'use warnings' are no longer
532 needed in Moose classes, Moose itself will
533 turn them on for you.
534 - added tests for this
535 - moved code from exported subs to private methods
536 in Moose::Meta::Class
539 - as with Moose, strict and warnings are
540 automatically turned on for you.
541 - added tests for this
544 - now handles an edge case for override errors
545 - added tests for this
546 - added some more edge case tests
548 0.09_02 Tues. May 16, 2006
549 ++ DEVELOPER RELEASE ++
551 - added prototypes to the exported subs
555 - added prototypes to the exported subs
558 * Moose::Util::TypeConstraints
559 - cleaned up prototypes for the subs
562 0.09_01 Fri. May 12, 2006
563 ++ DEVELOPER RELEASE ++
564 - This release works in combination with
565 Class::MOP 0.29_01, it is a developer
566 release because it uses the a new
567 instance sub-protocol and a fairly
568 complete Role implementation. It has
569 not yet been optimized, so it slower
570 the the previous CPAN version. This
571 release also lacks good updated docs,
572 the official release will have updated docs.
575 - refactored the keyword exports
576 - 'with' now checks Role validaity and
577 accepts more than one Role at a time
578 - 'extends' makes metaclass adjustments as
579 needed to ensure metaclass compatability
582 - refactored the keyword exports
583 - 'with' now checks Role validaity and
584 accepts more than one Role at a time
586 * Moose::Util::TypeConstraints
587 - added the 'enum' keyword for simple
588 string enumerations which can be used as
590 - see example of usage in t/202_example.t
593 - more careful checking of params to new()
596 - much work done on the role composition
597 - many new tests for conflict detection
598 and composition edge cases
599 - not enough documentation, I suggest
602 * Moose::Meta::Instance
603 - added new Instance metaclass to support
604 the new Class::MOP instance protocol
607 - some small changes to support the new
609 - some small additions to support Roles
611 * Moose::Meta::Attribute
612 - some improvements to the accessor generation code
614 - some small changes to support the new
616 - (still somewhat) experimental delegation support
617 with the 'handles' option
618 - added several tests for this
619 - no docs for this yet
621 0.05 Thurs. April 27, 2006
623 - keywords are now exported with Sub::Exporter
624 thanks to chansen for this commit
625 - has keyword now takes a 'metaclass' option
626 to support custom attribute meta-classes
627 on a per-attribute basis
628 - added tests for this
629 - the 'has' keyword not accepts inherited slot
630 specifications (has '+foo'). This is still an
631 experimental feature and probably not finished
632 see t/038_attribute_inherited_slot_specs.t for
633 more details, or ask about it on #moose
634 - added tests for this
637 - keywords are now exported with Sub::Exporter
639 * Moose::Utils::TypeConstraints
640 - reorganized the type constraint hierarchy, thanks
641 to nothingmuch and chansen for his help and advice
643 - added some tests for this
644 - keywords are now exported with Sub::Exporter
645 thanks to chansen for this commit
648 - due to changes in Class::MOP, we had to change
649 construct_instance (for the better)
651 * Moose::Meta::Attribute
652 - due to changes in Class::MOP, we had to add the
653 initialize_instance_slot method (it's a good thing)
655 * Moose::Meta::TypeConstraint
656 - added type constraint unions
657 - added tests for this
658 - added the is_subtype_of predicate method
659 - added tests for this
661 0.04 Sun. April 16th, 2006
663 - Roles can now consume other roles
664 - added tests for this
665 - Roles can specify required methods now with
666 the requires() keyword
667 - added tests for this
670 - ripped out much of it's guts ,.. much cleaner now
671 - added required methods and correct handling of
672 them in apply() for both classes and roles
673 - added tests for this
674 - no longer adds a does() method to consuming classes
675 it relys on the one in Moose::Object
676 - added roles attribute and some methods to support
677 roles consuming roles
679 * Moose::Meta::Attribute
680 - added support for triggers on attributes
681 - added tests for this
682 - added support for does option on an attribute
683 - added tests for this
686 - added support for attribute triggers in the
688 - added tests for this
691 - Moose no longer creates a subtype for your class
692 if a subtype of the same name already exists, this
693 should DWIM in 99.9999% of all cases
695 * Moose::Util::TypeConstraints
696 - fixed bug where incorrect subtype conflicts were
698 - added test for this
701 - this class can now be extended with 'use base' if
702 you need it, it properly loads the metaclass class now
703 - added test for this
705 0.03_02 Wed. April 12, 2006
707 - you must now explictly use Moose::Util::TypeConstraints
708 it no longer gets exported for you automatically
711 - new() now accepts hash-refs as well as key/value lists
712 - added does() method to check for Roles
713 - added tests for this
716 - added roles attribute along with the add_role() and
718 - added tests for this
721 - now adds a does() method to consuming classes
722 which tests the class's hierarchy for roles
723 - added tests for this
725 0.03_01 Mon. April 10, 2006
727 - added new Role recipe (no content yet, only code)
730 - added 'with' keyword for Role support
731 - added test and docs for this
732 - fixed subtype quoting bug
733 - added test for this
737 - added test and docs
739 * Moose::Util::TypeConstraints
740 - added the message keyword to add custom
741 error messages to type constraints
744 - the meta role to support Moose::Role
745 - added tests and docs
748 - moved a number of things from Moose.pm
749 to here, they should have been here
752 * Moose::Meta::Attribute
753 - moved the attribute option macros here
754 instead of putting them in Moose.pm
756 * Moose::Meta::TypeConstraint
757 - added the message attributes and the
759 - added tests and docs for this
761 0.03 Thurs. March 30, 2006
763 - added the Moose::Cookbook with 5 recipes,
764 describing all the stuff Moose can do.
767 - fixed an issue with &extends super class loading
768 it now captures errors and deals with inline
769 packages correctly (bug found by mst, solution
771 - added super/override & inner/augment features
772 - added tests and docs for these
775 - BUILDALL now takes a reference of the %params
776 that are passed to &new, and passes that to
779 * Moose::Util::TypeConstraints
780 - Type constraints now survive runtime reloading
781 - added test for this
784 - fixed the way attribute defaults are handled
785 during instance construction (bug found by chansen)
787 * Moose::Meta::Attribute
788 - read-only attributes now actually enforce their
789 read-only-ness (this corrected in Class::MOP as
792 0.02 Tues. March 21, 2006
794 - many more tests, fixing some bugs and
796 - &extends now loads the base module with
798 - added UNIVERSAL::require to the
801 - each new Moose class will also create
802 and register a subtype of Object which
803 correspond to the new Moose class.
804 - the 'isa' option in &has now only
805 accepts strings, and will DWIM in
808 * Moose::Util::TypeConstraints
809 - added type coercion features
810 - added tests for this
811 - added support for this in attributes
812 and instance construction
814 - type construction no longer creates a
815 function, it registers the type instead.
816 - added several functions to get the
820 - BUILDALL and DEMOLISHALL were broken
821 because of a mis-named hash key, Whoops :)
823 * Moose::Meta::Attribute
824 - adding support for coercion in the
825 autogenerated accessors
828 - adding support for coercion in the
829 instance construction
831 * Moose::Meta::TypeConstraint
832 * Moose::Meta::TypeCoercion
833 - type constraints and coercions are now
834 full fledges meta-objects
836 0.01 Wed. March 15, 2006
837 - Moooooooooooooooooose!!!