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