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