adding in the ability to pass params to rebles when doing runtime roles
[gitmo/Moose.git] / Changes
CommitLineData
e522431d 1Revision history for Perl extension Moose
2
80d955e4 30.39
8d62bf6d 4 * Moose
5 - documenting the use of '+name' with attributes
6 that come from recently composed roles. It makes
7 sense, people are using it, and so why not just
8 officially support it.
9c10b5ad 9 - fixing the 'extends' keyword so that it will not
10 trigger Ovid's bug (http://use.perl.org/~Ovid/journal/35763)
1321f087 11
12 * oose
13 - added the perl -Moose=+Class::Name feature to allow
14 monkeypatching of classes in one liners
15
9c10b5ad 16 * Moose::Util
17 - fixing the 'apply_all_roles' keyword so that it will not
18 trigger Ovid's bug (http://use.perl.org/~Ovid/journal/35763)
8d62bf6d 19
48045612 20 * Moose::Meta::Class
21 - added ->create method which now supports roles (thanks to jrockway)
22 - added tests for this
6d5cbd2b 23 - added ->create_anon_class which now supports roles and caching of
24 the results (thanks to jrockway)
25 - added tests for this
48045612 26
9f4334a1 27 * Moose::Util::TypeConstraints
4ab662d6 28 - class_type now accepts an optional second argument for a
29 custom message. POD anotated accordingly (groditi)
30 - added tests for this
9f4334a1 31 - it is now possible to make anon-enums by passing 'enum' an
32 ARRAY ref instead of the $name => @values. Everything else
33 works as before.
34 - added tests for this
35
8d62bf6d 36 * t/
37 - making test for using '+name' on attributes consumed
38 from a role, it works and makes sense too.
39
80d955e4 40 * Moose::Meta::Attribute
41 - fix handles so that it doesn't return nothing
42 when the method cannot be found, not sure why
f4f3e701 43 it ever did this originally, this means we now
44 have slightly better support for AUTOLOADed
45 objects
46 - added more delegation tests
1a386a6c 47
48 * Moose::Object
49 - localizing the Data::Dumper configurations so
50 that it does not pollute others (RT #33509)
80d955e4 51
520.38 Fri. Feb. 15, 2008
c3b81505 53 * Moose::Meta::Attribute
54 - fixed initializer to correctly do
55 type checking and coercion in the
56 callback
57 - added tests for this
58
1a740d8a 59 * t/
60 - fixed some finicky tests (thanks to konobi)
61
80d955e4 620.37 Thurs. Feb. 14, 2008
688fcdda 63 * Moose
64 - fixed some details in Moose::init_meta
65 and its superclass handling (thanks thepler)
66 - added tests for this (thanks thepler)
a28fe77b 67 - 'has' now dies if you don't pass in name
68 value pairs
2a5e59d0 69 - added the 'make_immutable' keyword as a shortcut
9df136d0 70 to make_immutable
688fcdda 71
72 * Moose::Meta::Class
73 Moose::Meta::Method::Constructor
74 Moose::Meta::Attribute
649b9340 75 - making (init_arg => undef) work here too
76 (thanks to nothingmuch)
be771c43 77
78 * Moose::Meta::Attribute
79 Moose::Meta::Method::Constructor
80 Moose::Meta::Method::Accessor
5fec9b97 81 - make lazy attributes respect attr initializers (rjbs)
be771c43 82 - added tests for this
688fcdda 83
84 * Moose::Util::TypeConstraints
85 Moose::Util::TypeConstraints::OptimizedConstraints
c14746bc 86 Moose::Meta::TypeConstraints
688fcdda 87 Moose::Meta::Attribute
88 Moose::Meta::Method::Constructor
89 Moose::Meta::Method::Accessor
649b9340 90 - making type errors use the
91 assigned message (thanks to Sartak)
92 - added tests for this
93
94 * Moose::Meta::Method::Destructor
95 - making sure DESTROY gets inlined properly
96 with successive DEMOLISH calls (thanks to manito)
688fcdda 97
ab76842e 98 * Moose::Meta::Attribute
99 Moose::Meta::Method::Accessor
100 - fixed handling of undef with type constraints
101 (thanks to Ernesto)
102 - added tests for this
c14746bc 103
104 * Moose::Util
105 - added &get_all_init_args and &get_all_attribute_values
106 (thanks to Sartak and nothingmuch)
ab76842e 107
e472c9a5 1080.36 Sat. Jan. 26, 2008
238b424d 109 * Moose::Role
110 Moose::Meta::Attribute
111 - role type tests now support when roles are
112 applied to non-Moose classes (found by ash)
113 - added tests for this (thanks to ash)
e472c9a5 114 - couple extra tests to boost code coverage
238b424d 115
116 * Moose::Meta::Method::Constructor
117 - improved fix for handling Class::MOP attributes
118 - added test for this
119
120 * Moose::Meta::Class
121 - handled the add_attribute($attribute_meta_object)
122 case correctly
123 - added test for this
124
3285fae9 1250.35 Tues. Jan. 22, 2008
45fd4af3 126 * Moose::Meta::Method::Constructor
127 - fix to make sure even Class::MOP attributes
472b7401 128 are handled correctly (Thanks to Dave Rolsky)
c3b35392 129 - added test for this (also Dave Rolsky)
4498537c 130
131 * Moose::Meta::Class
132 - improved error message on _apply_all_roles,
133 you should now use Moose::Util::apply_all_roles
134 and you shouldnt have been using a _ prefixed
135 method in the first place ;)
45fd4af3 136
fe05ce9c 1370.34 Mon. Jan. 21, 2008
778db3ac 138 ~~~ more misc. doc. fixes ~~~
139 ~~ updated copyright dates ~~
9b28d20b 140
141 Moose is now a postmodern object system :)
8bdc7f13 142 - (see the POD for details)
ccf49e80 143
144 * <<Role System Refactoring>>
145 - this release contains a major reworking and
146 cleanup of the role system
9b28d20b 147 - 100% backwards compat.
148 - Role application now restructured into seperate
149 classes based on type of applicants
150 - Role summation (combining of more than one role)
ccf49e80 151 is much cleaner and anon-classes are no longer
9b28d20b 152 used in this process
ccf49e80 153 - new Composite role metaclass
9b28d20b 154 - runtime application of roles to instances
155 is now more efficient and re-uses generated
156 classes when applicable
ccf49e80 157
9b28d20b 158 * <<New Role composition features>>
ccf49e80 159 - methods can now be excluded from a given role
9b28d20b 160 during composition
ccf49e80 161 - methods can now be aliased to another name (and
162 still retain the original as well)
4734114b 163
164 * Moose::Util::TypeConstraints::OptimizedConstraints
165 - added this module (see above)
166
d7d8a8c7 167 * Moose::Meta::Class
168 - fixed the &_process_attribute method to be called
4734114b 169 by &add_attribute, so that the API is now correct
170
e7c06c1e 171 * Moose::Meta::Method::Accessor
4734114b 172 - fixed bug when passing a list of values to
e7c06c1e 173 an accessor would get (incorrectly) ignored.
174 Thanks to Sartak for finding this ;)
175 - added tests for this (Sartak again)
32dd4a95 176
a4e516f6 177 * Moose::Meta::Method::Accessor
178 Moose::Meta::Method::Constructor
28412c0b 179 Moose::Meta::Attribute
ccf49e80 180 Moose::Meta::TypeConstraint
181 Moose::Meta::TypeCoercion
182 - lots of cleanup of such things as:
28412c0b 183 - generated methods
184 - type constraint handling
ccf49e80 185 - error handling/messages
186 (thanks to nothingmuch)
a4e516f6 187
4734114b 188 * Moose::Meta::TypeConstraint::Parameterizable
189 - added this module to support the refactor
190 in Moose::Meta::TypeConstraint::Parameterized
191
192 * Moose::Meta::TypeConstraint::Parameterized
193 - refactored how these types are handled so they
194 are more generic and not confined to ArrayRef
195 and HashRef only
a4e516f6 196
2de7e794 197 * t/
198 - shortened some file names for better VMS support (RT #32381)
199
25374f01 2000.33 Fri. Dec. 14, 2007
32dd4a95 201 !! Moose now loads 2 x faster !!
202 !! with new Class::MOP 0.49 !!
25374f01 203
f7865ec8 204 ++ new oose.pm module to make command line
25374f01 205 Moose-ness easier (see POD docs for more)
4734114b 206
25374f01 207 * Moose::Meta::Class
208 * Moose::Meta::Role
4734114b 209 - several tweaks to take advantage of the
25374f01 210 new method map caching in Class::MOP
211
39aba5c9 212 * Moose::Meta::TypeConstraint::Parameterized
213 - allow subtypes of ArrayRef and HashRef to
acb8a5db 214 be used as a container (sartak)
4734114b 215 - added tests for this
acb8a5db 216 - basic support for coercion to ArrayRef and
217 HashRef for containers (sartak)
4734114b 218 - added tests for this
219
25374f01 220 * Moose::Meta::TypeCoercion
221 - coercions will now create subtypes as needed
222 so you can now add coercions to parameterized
223 types without having to explictly define them
224 - added tests for this
225
ac211120 226 * Moose::Meta::Method::Accessor
227 - allow subclasses to decide whether we need
228 to copy the value into a new variable (sartak)
39aba5c9 229
dc26a424 2300.32 Tues. Dec. 4, 2007
8de73ff1 231 * Moose::Util::TypeConstraints
232 - fixing how subtype aliases of unions work
233 they should inherit the parent's coercion
234 - added tests for this
4734114b 235 - you can now define multiple coercions on
41e007e4 236 a single type at different times instead of
237 having to do it all in one place
238 - added tests for this
4734114b 239
8de73ff1 240 * Moose::Meta::TypeConstraint
241 - there is now a default constraint of sub { 1 }
242 instead of Moose::Util::TypeConstraints setting
243 this for us
244
4734114b 245 * Moose::Meta::TypeCoercion
246 * Moose::Meta::TypeCoercion::Union
247 - added the &has_coercion_for_type and
248 &add_type_coercions methods to support the
41e007e4 249 new features above (although you cannot add
250 more type coercions for Union types)
251
ffcb48b4 2520.31 Mon. Nov. 26, 2007
f3c4e20e 253 * Moose::Meta::Attribute
4734114b 254 - made the +attr syntax handle extending types with
f3c4e20e 255 parameters. So "has '+foo' => (isa => 'ArrayRef[Int]')"
256 now works if the original foo is an ArrayRef.
257 - added tests for this.
258 - delegation now works even if the attribute does not
259 have a reader method using the get_read_method_ref
4734114b 260 method from Class::MOP::Attribute.
f3c4e20e 261 - added tests for this
262 - added docs for this
4734114b 263
f3c4e20e 264 * Moose::Util::TypeConstraints
4734114b 265 - passing no "additional attribute info" to
266 &find_or_create_type_constraint will no longer
267 attempt to create an __ANON__ type for you,
f3c4e20e 268 instead it will just return undef.
269 - added docs for this
270
1edfdf1c 2710.30 Fri. Nov. 23, 2007
ca168e89 272 * Moose::Meta::Method::Constructor
273 -builder related bug in inlined constructor. (groditi)
274
3822d5ee 275 * Moose::Meta::Method::Accessor
276 - genereate unnecessary calls to predicates and refactor
277 code generation for runtime speed (groditi)
278
5d776bdf 279 * Moose::Util::TypeConstraints
0e0709ea 280 - fix ClassName constraint to introspect symbol table (mst)
a0f8153d 281 - added more tests for this (mst)
282 - fixed it so that subtype 'Foo' => as 'HashRef[Int]' ...
283 with work correctly.
284 - added tests for this
5d776bdf 285
1edfdf1c 286 * Moose::Cookbook
287 - adding the link to Recipie 11 (written by Sartak)
288 - adding test for SYNOPSIS code
289
4734114b 290 * t/
ca168e89 291 - New tests for builder bug. Upon instantiation, if an
292 attribute had a builder, no value and was not lazy the
293 builder default was not getting run, oops. (groditi)
294
b97b9655 2950.29 Tues. Nov. 13, 2007
0b26305c 296 * Moose::Meta::Attribute
5d776bdf 297 - Fix error message on missing builder method (groditi)
0b26305c 298
299 * Moose::Meta::Method::Accessor
5d776bdf 300 - Fix error message on missing builder method (groditi)
0b26305c 301
4734114b 302 * t/
5d776bdf 303 - Add test to check for the correct error message when
304 builder method is missing (groditi)
0b26305c 305
98c4c382 3060.28 Tues. Nov. 13, 2007
4734114b 307 - 0.27 packaged incorrectly (groditi)
98c4c382 308
e134cd19 3090.27 Tues. Nov. 13, 2007
26fbace8 310 * Moose::Meta::Attribute
311 - Added support for the new builder option (groditi)
6af1a927 312 - Added support for lazy_build option (groditi)
1ed0b94f 313 - Changed slot initialization for predicate changes (groditi)
26fbace8 314
315 * Moose::Meta::Method::Accessor
6af1a927 316 - Added support for lazy_build option (groditi)
4734114b 317 - Fix inline methods to work with corrected predicate
28669f89 318 behavior (groditi)
26fbace8 319
7a5b07b3 320 * Moose::Meta::Method::Constructor
321 - Added support for lazy_build option (groditi)
322
26fbace8 323 * t/
28669f89 324 - tests for builder and lazy_build (groditi)
26fbace8 325
4734114b 326 * fixing some misc. bits in the docs that
28669f89 327 got mentioned on CPAN Forum & perlmonks
4734114b 328
e7f8d0c2 329 * Moose::Meta::Role
4734114b 330 - fixed how required methods are handled
e7f8d0c2 331 when they encounter overriden or modified
332 methods from a class (thanks to confound).
333 - added tests for this
5af6a16d 334
3796382a 335 * Moose::Util::TypeConstraint
4734114b 336 - fixed the type notation parser so that
337 the | always creates a union and so is
338 no longer a valid type char (thanks to
339 konobi, mugwump and #moose for working
3796382a 340 this one out.)
341 - added more tests for this
342
77a18c28 3430.26 Thurs. Sept. 27, 2007
344 == New Features ==
4734114b 345
77a18c28 346 * Parameterized Types
4734114b 347 We now support parameterized collection types, such as:
77a18c28 348 ArrayRef[Int] # array or integers
349 HashRef[Object] # a hash with object values
350 They can also be nested:
351 ArrayRef[HashRef[RegExpr]] # an array of hashes with regexpr values
352 And work with the type unions as well:
353 ArrayRef[Int | Str] # array of integers of strings
4734114b 354
77a18c28 355 * Better Framework Extendability
4734114b 356 Moose.pm is now "extendable" such that it is now much
357 easier to extend the framework and add your own keywords
77a18c28 358 and customizations. See the "EXTENDING AND EMBEDDING MOOSE"
359 section of the Moose.pm docs.
4734114b 360
77a18c28 361 * Moose Snacks!
4734114b 362 In an effort to begin documenting some of the various
363 details of Moose as well as some common idioms, we have
364 created Moose::Cookbook::Snacks as a place to find
77a18c28 365 small (easily digestable) nuggets of Moose code.
4734114b 366
77a18c28 367 ====
fb697a87 368 ~ Several doc updates/cleanup thanks to castaway ~
4734114b 369
370 - converted build system to use Module::Install instead of
e46f5cc2 371 Module::Build (thanks to jrockway)
fb697a87 372
d67145ed 373 * Moose
4734114b 374 - added all the meta classes to the immutable list and
d67145ed 375 set it to inline the accessors
4734114b 376 - fix import to allow Sub::Exporter like { into => }
e59a5c29 377 and { into_level => } (perigrin)
4734114b 378 - exposed and documented init_meta() to allow better
e59a5c29 379 embedding and extending of Moose (perigrin)
4734114b 380
e59a5c29 381 * t/
382 - complete re-organization of the test suite
4734114b 383 - added some new tests as well
77a18c28 384 - finally re-enabled the Moose::POOP test since
385 the new version of DBM::Deep now works again
386 (thanks rob)
b468a3d3 387
388 * Moose::Meta::Class
4734114b 389 - fixed very odd and very nasty recursion bug with
b468a3d3 390 inner/augment (mst)
391 - added tests for this (eilara)
d67145ed 392
3726f905 393 * Moose::Meta::Attribute
394 Moose::Meta::Method::Constructor
395 Moose::Meta::Method::Accessor
4734114b 396 - fixed issue with overload::Overloaded getting called
f1917f58 397 on non-blessed items. (RT #29269)
3726f905 398 - added tests for this
4734114b 399
3ccdc84a 400 * Moose::Meta::Method::Accessor
4734114b 401 - fixed issue with generated accessor code making
3ccdc84a 402 assumptions about hash based classes (thanks to dexter)
4734114b 403
3726f905 404 * Moose::Coookbook::Snacks
4734114b 405 - these are bits of documentation, not quite as big as
406 Recipes but which have no clear place in the module docs.
3726f905 407 So they are Snacks! (horray for castaway++)
408
07cde929 409 * Moose::Cookbook::Recipe4
410 - updated it to use the new ArrayRef[MyType] construct
411 - updated the accompanying test as well
412
3726f905 413 +++ Major Refactor of the Type Constraint system +++
414 +++ with new features added as well +++
415
22aed3c0 416 * Moose::Util::TypeConstraint
4734114b 417 - no longer uses package variable to keep track of
22aed3c0 418 the type constraints, now uses the an instance of
419 Moose::Meta::TypeConstraint::Registry to do it
f1917f58 420 - added more sophisticated type notation parsing
421 (thanks to mugwump)
422 - added tests for this
22aed3c0 423
d67145ed 424 * Moose::Meta::TypeConstraint
425 - some minor adjustments to make subclassing easier
4734114b 426 - added the package_defined_in attribute so that we
22aed3c0 427 can track where the type constraints are created
4734114b 428
d67145ed 429 * Moose::Meta::TypeConstraint::Union
4734114b 430 - this is now been refactored to be a subclass of
3726f905 431 Moose::Meta::TypeConstraint
4734114b 432
3726f905 433 * Moose::Meta::TypeCoercion::Union
434 - this has been added to service the newly refactored
4734114b 435 Moose::Meta::TypeConstraint::Union and is itself
3726f905 436 a subclass of Moose::Meta::TypeCoercion
4734114b 437
0fbd4b0a 438 * Moose::Meta::TypeConstraint::Parameterized
d67145ed 439 - added this module (taken from MooseX::AttributeHelpers)
440 to help construct nested collection types
441 - added tests for this
4734114b 442
22aed3c0 443 * Moose::Meta::TypeConstraint::Registry
444 - added this class to keep track of type constraints
d67145ed 445
887169d7 4460.25 Mon. Aug. 13, 2007
8eca434b 447 * Moose
4734114b 448 - Documentation update to reference Moose::Util::TypeConstraints
449 under 'isa' in 'has' for how to define a new type
8eca434b 450 (thanks to shlomif).
451
ab859145 452 * Moose::Meta::Attribute
4734114b 453 - required attributes now will no longer accept undef
ab859145 454 from the constructor, even if there is a default and lazy
455 - added tests for this
4734114b 456 - default subroutines must return a value which passes the
7a5ebc40 457 type constraint
458 - added tests for this
4734114b 459
a909a4df 460 * Moose::Meta::Attribute
461 * Moose::Meta::Method::Constructor
4734114b 462 * Moose::Meta::Method::Accessor
a909a4df 463 - type-constraint tests now handle overloaded objects correctly
464 in the error message
4734114b 465 - added tests for this (thanks to EvanCarroll)
ab859145 466
8eca434b 467 * Moose::Meta::TypeConstraint::Union
4734114b 468 - added (has_)hand_optimized_constraint to this class so that
8eca434b 469 it behaves as the regular Moose::Meta::TypeConstraint does.
470
5868294f 471 * Moose::Meta::Role
887169d7 472 - large refactoring of this code
4734114b 473 - added several more tests
474 - tests for subtle conflict resolition issues
7125b244 475 added, but not currently running
476 (thanks to kolibre)
477
4734114b 478 * Moose::Cookbook::Recipe7
479 - added new recipe for augment/inner functionality
887169d7 480 (still in progress)
7125b244 481 - added test for this
5868294f 482
24a8fe99 483 * Moose::Spec::Role
7125b244 484 - a formal definition of roles (still in progress)
24a8fe99 485
9a641848 486 * Moose::Util
887169d7 487 - utilities for easier working with Moose classes
7125b244 488 - added tests for these
9a641848 489
490 * Test::Moose
887169d7 491 - This contains Moose specific test functions
7125b244 492 - added tests for these
9a641848 493
6b4c1bdd 4940.24 Tues. July 3, 2007
495 ~ Some doc updates/cleanup ~
c84f324f 496
497 * Moose::Meta::Attribute
4734114b 498 - added support for roles to be given as parameters
c84f324f 499 to the 'handles' option.
500 - added tests and docs for this
4734114b 501 - the has '+foo' attribute form now accepts changes to
83cc9094 502 the lazy option, and the addition of a handles option
503 (but not changing the handles option)
504 - added tests and docs for this
c84f324f 505
1db8ecc7 506 * Moose::Meta::Role
507 - required methods are now fetched using find_method_by_name
508 so that required methods can come from superclasses
509 - adjusted tests for this
510
81941e9b 5110.23 Mon. June 18, 2007
73b84d2e 512 * Moose::Meta::Method::Constructor
513 - fix inlined constructor for hierarchy with multiple BUILD methods (mst)
ac2dc464 514 * Moose::Meta::Class
515 - Modify make_immutable to work with the new Class::MOP immutable
516 mechanism + POD + very basic test (groditi)
cbe25729 517 * Moose::Meta::Attribute
4734114b 518 - Fix handles to use goto() so that caller() comes out properly on
cbe25729 519 the other side (perigrin)
ac2dc464 520
db53853c 5210.22 Thurs. May 31, 2007
3969267d 522 * Moose::Util::TypeConstraints
4734114b 523 - fix for prototype undeclared issue when Moose::Util::TypeConstraints
db53853c 524 loaded before consumers (e.g. Moose::Meta::Attribute) by predeclaring
525 prototypes for functions
4734114b 526 - added the ClassName type constraint, this checks for strings
527 which will respond true to ->isa(UNIVERSAL).
9af1d28b 528 - added tests and docs for this
4734114b 529 - subtyping just in name now works correctly by making the
86629f93 530 default for where be { 1 }
4734114b 531 - added test for this
3969267d 532
d7611a4a 533 * Moose::Meta::Method::Accessor
4734114b 534 - coerce and lazy now work together correctly, thanks to
d7611a4a 535 merlyn for finding this bug
536 - tests added for this
df492bba 537 - fix reader presedence bug in Moose::Meta::Attribute + tests
d7611a4a 538
86629f93 539 * Moose::Object
540 - Foo->new(undef) now gets ignored, it is assumed you meant to pass
4734114b 541 a HASH-ref and missed. This produces better error messages then
86629f93 542 having it die cause undef is not a HASH.
543 - added tests for this
544
74a0a945 5450.21 Thursday, May 2nd, 2007
52c7c330 546 * Moose
547 - added SUPER_SLOT and INNER_SLOT class hashes to support unimport
548 - modified unimport to remove super and inner along with the rest
549 - altered unimport tests to handle this
550
551 * Moose::Role
552 - altered super export to populate SUPER_SLOT
553
554 * Moose::Meta::Class
555 - altered augment and override modifier application to use *_SLOT
556 - modified tests for these to unimport one test class each to test
557
492d4d76 558 * Moose::Meta::Role
559 - fixed issue where custom attribute metaclasses
560 where not handled correctly in roles
561 - added tests for this
4734114b 562
5cb193ed 563 * Moose::Meta::Class
4734114b 564 - fixed issue where extending metaclasses with
5cb193ed 565 roles would blow up. Thanks to Aankhen`` for
566 finding this insidious error, and it's solution.
4734114b 567
568 ~~ lots of spelling and grammer fixes in the docs,
0305961b 569 many many thanks to rlb3 and Aankhen for these :)
492d4d76 570
e518dfb4 5710.20 Friday, April 6th, 2007
a60285b3 572 >> I messed up the SKIP logic in one test
573 so this release is just to fix that.
574
93c435b3 575 * Moose
576 - 'has' now also accepts an ARRAY ref
577 to create multiple attrs (see docs)
578 (thanks to konobi for this)
4734114b 579 - added tests and docs
93c435b3 580
cd7eeaf5 5810.19 Thurs. April 5th, 2007
582 ~~ More documentation updates ~~
583
c899258b 584 * Moose::Util::TypeConstraints
c1935ade 585 - 'type' now supports messages as well
ddbdc0cb 586 thanks to phaylon for finding this
c899258b 587 - added tests for this
4734114b 588 - added &list_all_type_constraints and
c1935ade 589 &list_all_builtin_type_constraints
943596a6 590 functions to facilitate introspection.
4734114b 591
d022f632 592 * Moose::Meta::Attribute
4734114b 593 - fixed regexp 'handles' declarations
d022f632 594 to build the list of delegated methods
4734114b 595 correctly (and not override important
596 things like &new) thanks to ashleyb
ddbdc0cb 597 for finding this
598 - added tests and docs for this
c1935ade 599 - added the 'documentation' attributes
4734114b 600 so that you can actually document your
601 attributes and inspect them through the
ddbdc0cb 602 meta-object.
d022f632 603 - added tests and docs for this
604
c1935ade 605 * Moose::Meta::Class
606 - when loading custom attribute metaclasses
4734114b 607 it will first look in for the class in the
608 Moose::Meta::Attribute::Custom::$name, and
c1935ade 609 then default to just loading $name.
610 - added tests and docs for this
611
900466d6 612 * Moose::Meta::TypeConstraint
613 - type constraints now stringify to their names.
614 - added test for this
615
d022f632 616 * misc.
4734114b 617 - added tests to assure we work with Module::Refresh
618 - added stricter test skip logic in the Moose POOP
ddbdc0cb 619 test, ask Rob Kinyon why.
620 - *cough* DBM::Deep 1.0 backwards compatability sucks *cough* ;)
c899258b 621
af5199c6 6220.18 Sat. March 10, 2007
623 ~~ Many, many documentation updates ~~
ddbdc0cb 624
625 * misc.
4734114b 626 - We now use Class::MOP::load_class to
627 load all classes.
628 - added tests to show types and subtypes
ddbdc0cb 629 working with Declare::Constraints::Simple
630 and Test::Deep as constraint engines.
b77fdbed 631
587ae0d2 6320.18_001
d01f1dab 633 !! You must have Class::MOP 0.37_001 !!
634 !! for this developer release to work !!
635
734d1752 636 This release was primarily adding the immutable
4734114b 637 feature to Moose. An immutable class is one which
638 you promise not to alter. When you set the class
639 as immutable it will perform various bits of
734d1752 640 memoization and inline certain part of the code
4734114b 641 (constructors, destructors and accessors). This
734d1752 642 minimizes (and in some cases totally eliminates)
4734114b 643 one of Moose's biggest performance hits. This
734d1752 644 feature is not on by default, and is 100% optional.
4734114b 645 It has several configurable bits as well, so you
734d1752 646 can pick and choose to your specific needs.
4734114b 647
648 The changes involved in this were fairly wide and
649 highly specific, but 100% backwards compatible, so
650 I am not going to enumerate them here. If you are
651 truely interested in what was changed, please do
734d1752 652 a diff :)
587ae0d2 653
6540.17 Tues. Nov. 14, 2006
655 * Moose::Meta::Method::Accessor
4734114b 656 - bugfix for read-only accessors which
587ae0d2 657 are have a type constraint and lazy.
658 Thanks to chansen for finding it.
659
6600.16 Tues. Nov. 14, 2006
661 ++ NOTE ++
4734114b 662 There are some speed improvements in this release,
587ae0d2 663 but they are only the begining, so stay tuned.
4734114b 664
587ae0d2 665 * Moose::Object
4734114b 666 - BUILDALL and DEMOLISHALL no longer get
587ae0d2 667 called unless they actually need to be.
668 This gave us a signifigant speed boost
4734114b 669 for the cases when there is no BUILD or
587ae0d2 670 DEMOLISH method present.
4734114b 671
587ae0d2 672 * Moose::Util::TypeConstraints
673 * Moose::Meta::TypeConstraint
4734114b 674 - added an 'optimize_as' option to the
587ae0d2 675 type constraint, which allows for a
4734114b 676 hand optimized version of the type
587ae0d2 677 constraint to be used when possible.
678 - Any internally created type constraints
679 now provide an optimized version as well.
680
ecb59493 6810.15 Sun. Nov. 5, 2006
946289d1 682 ++ NOTE ++
4734114b 683 This version of Moose *must* have Class::MOP 0.36 in order
684 to work correctly. A number of small internal tweaks have
946289d1 685 been made in order to be compatible with that release.
571dd39f 686
687 * Moose::Util::TypeConstraints
4734114b 688 - added &unimport so that you can clean out
689 your class namespace of these exported
571dd39f 690 keywords
4734114b 691
37ee30c9 692 * Moose::Meta::Class
4734114b 693 - fixed minor issue which occasionally
694 comes up during global destruction
37ee30c9 695 (thanks omega)
4734114b 696 - moved Moose::Meta::Method::Overriden into
946289d1 697 its own file.
4734114b 698
699 * Moose::Meta::Role
700 - moved Moose::Meta::Role::Method into
946289d1 701 its own file.
4734114b 702
43123819 703 * Moose::Meta::Attribute
4734114b 704 - changed how we do type checks so that
705 we reduce the overall cost, but still
7623f774 706 retain correctness.
946289d1 707 *** API CHANGE ***
4734114b 708 - moved accessor generation methods to
709 Moose::Meta::Method::Accessor to
710 conform to the API changes from
946289d1 711 Class::MOP 0.36
4734114b 712
43123819 713 * Moose::Meta::TypeConstraint
714 - changed how constraints are compiled
715 so that we do less recursion and more
4734114b 716 iteration. This makes the type check
43123819 717 faster :)
946289d1 718 - moved Moose::Meta::TypeConstraint::Union
719 into its own file
4734114b 720
946289d1 721 * Moose::Meta::Method::Accessor
4734114b 722 - created this from methods formerly found in
946289d1 723 Moose::Meta::Attribute
4734114b 724
946289d1 725 * Moose::Meta::Role::Method
726 - moved this from Moose::Meta::Role
4734114b 727
946289d1 728 * Moose::Meta::Method::Overriden
729 - moved this from Moose::Meta::Class
4734114b 730
946289d1 731 * Moose::Meta::TypeConstraint::Union
732 - moved this from Moose::Meta::TypeConstraint
37ee30c9 733
3ec7b7a3 7340.14 Mon. Oct. 9, 2006
4fd69d6c 735
736 * Moose::Meta::Attribute
4734114b 737 - fixed lazy attributes which were not getting
4fd69d6c 738 checked with the type constraint (thanks ashley)
739 - added tests for this
4734114b 740 - removed the over-enthusiastic DWIMery of the
741 automatic ArrayRef and HashRef defaults, it
3ec7b7a3 742 broke predicates in an ugly way.
743 - removed tests for this
4fd69d6c 744
c0c41f76 7450.13 Sat. Sept. 30, 2006
093b12c2 746 ++ NOTE ++
4734114b 747 This version of Moose *must* have Class::MOP 0.35 in order
748 to work correctly. A number of small internal tweaks have
093b12c2 749 been made in order to be compatible with that release.
750
3c2bc5e2 751 * Moose
752 - Removed the use of UNIVERSAL::require to be a better
4734114b 753 symbol table citizen and remove a dependency
093b12c2 754 (thanks Adam Kennedy)
3c2bc5e2 755
2a0f3bd3 756 **~~ removed experimental & undocumented feature ~~**
4734114b 757 - commented out the 'method' and 'self' keywords, see the
2a0f3bd3 758 comments for more info.
759
e95c7c42 760 * Moose::Cookbook
4734114b 761 - added a FAQ and WTF files to document frequently
e95c7c42 762 asked questions and common problems
4734114b 763
3f7376b0 764 * Moose::Util::TypeConstraints
0a5bd159 765 - added GlobRef and FileHandle type constraint
3f7376b0 766 - added tests for this
4734114b 767
3f7376b0 768 * Moose::Meta::Attribute
769 - if your attribute 'isa' ArrayRef of HashRef, and you have
770 not explicitly set a default, then make the default DWIM.
4734114b 771 This will also work for subtypes of ArrayRef and HashRef
94b8bbb8 772 as well.
773 - you can now auto-deref subtypes of ArrayRef or HashRef too.
774 - new test added for this (thanks to ashley)
4734114b 775
b805c70c 776 * Moose::Meta::Role
777 - added basic support for runtime role composition
4734114b 778 but this is still *highly experimental*, so feedback
0a5bd159 779 is much appreciated :)
b805c70c 780 - added tests for this
e95c7c42 781
0a5bd159 782 * Moose::Meta::TypeConstraint
783 - the type constraint now handles the coercion process
4734114b 784 through delegation, this is to support the coercion
0a5bd159 785 of unions
4734114b 786
0a5bd159 787 * Moose::Meta::TypeConstraint::Union
4734114b 788 - it is now possible for coercions to be performed
0a5bd159 789 on a type union
790 - added tests for this (thanks to konobi)
791
e95c7c42 792 * Moose::Meta::TypeCoercion
4734114b 793 - properly capturing error when type constraint
e95c7c42 794 is not found
795
3c2bc5e2 796 * Build.PL
797 - Scalar::Util 1.18 is bad on Win32, so temporarily
798 only require version 1.17 for Win32 and cygwin.
4734114b 799 (thanks Adam Kennedy)
3c2bc5e2 800
40e89659 8010.12 Sat. Sept. 1, 2006
2bdd01cd 802 * Moose::Cookbook
803 - Recipe5 (subtypes & coercion) has been written
4734114b 804
2bdd01cd 805 * Moose
4734114b 806 - fixed "bad meta" error message to be more descriptive
807 - fixed &unimport to not remove the &inner and &super
3279ab4a 808 keywords because we need to localize them.
68efb014 809 - fixed number of spelling/grammer issues, thanks Theory :)
4734114b 810
0558683c 811 **~~ experimental & undocumented feature ~~**
4734114b 812 - added the method and self keywords, they are basically
68efb014 813 just sugar, and they may not stay around.
4734114b 814
f742dfef 815 * Moose::Object
4734114b 816 - added &dump method to easily Data::Dumper
68efb014 817 an object
4734114b 818
b26e162e 819 * Moose::Meta::TypeConstraint
820 - added the &is_a_type_of method to check both the current
821 and the subtype of a method (similar to &isa with classes)
f008ac1f 822
68efb014 823 * Moose::Meta::Role
824 - this is now a subclass of Class::MOP::Module, and no longer
4734114b 825 creates the _role_meta ugliness of before.
68efb014 826 - fixed tests to reflect this change
4734114b 827
8c835eba 8280.11 Wed. July 12, 2006
31f8ec72 829 * Moose
830 - added an &unimport method to remove all the keywords
4734114b 831 that Moose will import, simply add 'no Moose' to the
832 bottom of your class file.
833
31f8ec72 834 * t/
4734114b 835 - fixed some test failures caused by a forgotten test
31f8ec72 836 dependency.
837
864cd714 8380.10 Thurs. July 6, 2006
01a8e221 839 * Moose
840 - improved error message when loading modules so
841 it is less confusing when you load a role.
4734114b 842 - added &calculate_all_roles method to
2b14ac61 843 Moose::Meta::Class and Moose::Meta::Role
4734114b 844
2b14ac61 845 NOTE:
846 This module has been tested against Class::MOP 0.30
4734114b 847 but it does not yet utilize the optimizations
2b14ac61 848 it makes available. Stay tuned for that ;)
4734114b 849
2b14ac61 8500.09_03 Fri. June 23, 2006
715ea0b7 851 ++ DEVELOPER RELEASE ++
4276ccb4 852 * Moose
853 - 'use strict' and 'use warnings' are no longer
4734114b 854 needed in Moose classes, Moose itself will
4276ccb4 855 turn them on for you.
856 - added tests for this
1341f10c 857 - moved code from exported subs to private methods
858 in Moose::Meta::Class
4734114b 859
4276ccb4 860 * Moose::Role
4734114b 861 - as with Moose, strict and warnings are
4276ccb4 862 automatically turned on for you.
4734114b 863 - added tests for this
864
e39d707f 865 * Moose::Meta::Role
866 - now handles an edge case for override errors
867 - added tests for this
b7f2d25b 868 - added some more edge case tests
1341f10c 869
43d599e5 8700.09_02 Tues. May 16, 2006
715ea0b7 871 ++ DEVELOPER RELEASE ++
2c0cbef7 872 * Moose
873 - added prototypes to the exported subs
43d599e5 874 - updated docs
4734114b 875
2c0cbef7 876 * Moose::Role
4734114b 877 - added prototypes to the exported subs
43d599e5 878 - updated docs
4734114b 879
2c0cbef7 880 * Moose::Util::TypeConstraints
4734114b 881 - cleaned up prototypes for the subs
882 - updated docs
2c0cbef7 883
72c4f6d1 8840.09_01 Fri. May 12, 2006
885 ++ DEVELOPER RELEASE ++
4734114b 886 - This release works in combination with
887 Class::MOP 0.29_01, it is a developer
888 release because it uses the a new
72c4f6d1 889 instance sub-protocol and a fairly
4734114b 890 complete Role implementation. It has
72c4f6d1 891 not yet been optimized, so it slower
4734114b 892 the the previous CPAN version. This
893 release also lacks good updated docs,
72c4f6d1 894 the official release will have updated docs.
895
4734114b 896 * Moose
98aae381 897 - refactored the keyword exports
4734114b 898 - 'with' now checks Role validaity and
db1ab48d 899 accepts more than one Role at a time
4734114b 900 - 'extends' makes metaclass adjustments as
98aae381 901 needed to ensure metaclass compatability
4734114b 902
72c4f6d1 903 * Moose::Role
904 - refactored the keyword exports
4734114b 905 - 'with' now checks Role validaity and
72c4f6d1 906 accepts more than one Role at a time
4734114b 907
98aae381 908 * Moose::Util::TypeConstraints
4734114b 909 - added the 'enum' keyword for simple
910 string enumerations which can be used as
98aae381 911 type constraints
db1ab48d 912 - see example of usage in t/202_example.t
4734114b 913
98aae381 914 * Moose::Object
915 - more careful checking of params to new()
4734114b 916
72c4f6d1 917 * Moose::Meta::Role
918 - much work done on the role composition
4734114b 919 - many new tests for conflict detection
72c4f6d1 920 and composition edge cases
4734114b 921 - not enough documentation, I suggest
922 looking at the tests
923
98aae381 924 * Moose::Meta::Instance
4734114b 925 - added new Instance metaclass to support
98aae381 926 the new Class::MOP instance protocol
4734114b 927
98aae381 928 * Moose::Meta::Class
4734114b 929 - some small changes to support the new
98aae381 930 instance protocol
72c4f6d1 931 - some small additions to support Roles
4734114b 932
98aae381 933 * Moose::Meta::Attribute
934 - some improvements to the accessor generation code
935 by nothingmuch
4734114b 936 - some small changes to support the new
98aae381 937 instance protocol
4734114b 938 - (still somewhat) experimental delegation support
98aae381 939 with the 'handles' option
940 - added several tests for this
db1ab48d 941 - no docs for this yet
98aae381 942
35c8b8f2 9430.05 Thurs. April 27, 2006
2d562421 944 * Moose
945 - keywords are now exported with Sub::Exporter
946 thanks to chansen for this commit
4734114b 947 - has keyword now takes a 'metaclass' option
948 to support custom attribute meta-classes
590868a3 949 on a per-attribute basis
4734114b 950 - added tests for this
daea75c9 951 - the 'has' keyword not accepts inherited slot
4734114b 952 specifications (has '+foo'). This is still an
daea75c9 953 experimental feature and probably not finished
4734114b 954 see t/038_attribute_inherited_slot_specs.t for
daea75c9 955 more details, or ask about it on #moose
fcb7afc2 956 - added tests for this
4734114b 957
2d562421 958 * Moose::Role
959 - keywords are now exported with Sub::Exporter
960
5204cd52 961 * Moose::Utils::TypeConstraints
cce8198b 962 - reorganized the type constraint hierarchy, thanks
4734114b 963 to nothingmuch and chansen for his help and advice
cce8198b 964 on this
965 - added some tests for this
7eaef7ad 966 - keywords are now exported with Sub::Exporter
35c8b8f2 967 thanks to chansen for this commit
5204cd52 968
d500266f 969 * Moose::Meta::Class
970 - due to changes in Class::MOP, we had to change
971 construct_instance (for the better)
4734114b 972
d500266f 973 * Moose::Meta::Attribute
4734114b 974 - due to changes in Class::MOP, we had to add the
d500266f 975 initialize_instance_slot method (it's a good thing)
4734114b 976
cce8198b 977 * Moose::Meta::TypeConstraint
4734114b 978 - added type constraint unions
c07af9d2 979 - added tests for this
cce8198b 980 - added the is_subtype_of predicate method
981 - added tests for this
d500266f 982
02a0fb52 9830.04 Sun. April 16th, 2006
1331430a 984 * Moose::Role
985 - Roles can now consume other roles
986 - added tests for this
4734114b 987 - Roles can specify required methods now with
1331430a 988 the requires() keyword
989 - added tests for this
990
bdabd620 991 * Moose::Meta::Role
992 - ripped out much of it's guts ,.. much cleaner now
4734114b 993 - added required methods and correct handling of
fa1be058 994 them in apply() for both classes and roles
995 - added tests for this
4734114b 996 - no longer adds a does() method to consuming classes
1331430a 997 it relys on the one in Moose::Object
4734114b 998 - added roles attribute and some methods to support
1331430a 999 roles consuming roles
8c9d74e7 1000
1001 * Moose::Meta::Attribute
1002 - added support for triggers on attributes
1003 - added tests for this
4734114b 1004 - added support for does option on an attribute
02a0fb52 1005 - added tests for this
4734114b 1006
8c9d74e7 1007 * Moose::Meta::Class
4734114b 1008 - added support for attribute triggers in the
8c9d74e7 1009 object construction
1010 - added tests for this
4734114b 1011
256903b6 1012 * Moose
4734114b 1013 - Moose no longer creates a subtype for your class
1014 if a subtype of the same name already exists, this
256903b6 1015 should DWIM in 99.9999% of all cases
4734114b 1016
256903b6 1017 * Moose::Util::TypeConstraints
4734114b 1018 - fixed bug where incorrect subtype conflicts were
256903b6 1019 being reported
8c9d74e7 1020 - added test for this
4734114b 1021
8c9d74e7 1022 * Moose::Object
1023 - this class can now be extended with 'use base' if
1024 you need it, it properly loads the metaclass class now
1025 - added test for this
bdabd620 1026
0677220d 10270.03_02 Wed. April 12, 2006
05d9eaf6 1028 * Moose
1029 - you must now explictly use Moose::Util::TypeConstraints
1030 it no longer gets exported for you automatically
4734114b 1031
05d9eaf6 1032 * Moose::Object
1033 - new() now accepts hash-refs as well as key/value lists
0677220d 1034 - added does() method to check for Roles
1035 - added tests for this
05d9eaf6 1036
0677220d 1037 * Moose::Meta::Class
4734114b 1038 - added roles attribute along with the add_role() and
0677220d 1039 does_role() methods
4734114b 1040 - added tests for this
0677220d 1041
1042 * Moose::Meta::Role
4734114b 1043 - now adds a does() method to consuming classes
0677220d 1044 which tests the class's hierarchy for roles
1045 - added tests for this
1046
10470.03_01 Mon. April 10, 2006
e9ec68d6 1048 * Moose::Cookbook
76d37e5a 1049 - added new Role recipe (no content yet, only code)
4734114b 1050
e9ec68d6 1051 * Moose
1052 - added 'with' keyword for Role support
1053 - added test and docs for this
1054 - fixed subtype quoting bug
4734114b 1055 - added test for this
e9ec68d6 1056
1057 * Moose::Role
1058 - Roles for Moose
1059 - added test and docs
76d37e5a 1060
1061 * Moose::Util::TypeConstraints
1062 - added the message keyword to add custom
4734114b 1063 error messages to type constraints
1064
e9ec68d6 1065 * Moose::Meta::Role
1066 - the meta role to support Moose::Role
1067 - added tests and docs
4734114b 1068
e9ec68d6 1069 * Moose::Meta::Class
4734114b 1070 - moved a number of things from Moose.pm
1071 to here, they should have been here
e9ec68d6 1072 in the first place
1073
1074 * Moose::Meta::Attribute
1075 - moved the attribute option macros here
1076 instead of putting them in Moose.pm
e185c027 1077
76d37e5a 1078 * Moose::Meta::TypeConstraint
4734114b 1079 - added the message attributes and the
76d37e5a 1080 validate method
1081 - added tests and docs for this
1082
0ac928d2 10830.03 Thurs. March 30, 2006
e9bb8a31 1084 * Moose::Cookbook
4734114b 1085 - added the Moose::Cookbook with 5 recipes,
e9bb8a31 1086 describing all the stuff Moose can do.
1087
d7f17ebb 1088 * Moose
1089 - fixed an issue with &extends super class loading
4734114b 1090 it now captures errors and deals with inline
1091 packages correctly (bug found by mst, solution
d7f17ebb 1092 stolen from alias)
159da176 1093 - added super/override & inner/augment features
1094 - added tests and docs for these
4734114b 1095
d7f17ebb 1096 * Moose::Object
4734114b 1097 - BUILDALL now takes a reference of the %params
1098 that are passed to &new, and passes that to
d7f17ebb 1099 each BUILD as well.
4734114b 1100
471c4f09 1101 * Moose::Util::TypeConstraints
1102 - Type constraints now survive runtime reloading
1103 - added test for this
d7f17ebb 1104
8339fae2 1105 * Moose::Meta::Class
4734114b 1106 - fixed the way attribute defaults are handled
8339fae2 1107 during instance construction (bug found by chansen)
1108
d7f17ebb 1109 * Moose::Meta::Attribute
1110 - read-only attributes now actually enforce their
4734114b 1111 read-only-ness (this corrected in Class::MOP as
9deed647 1112 well)
d7f17ebb 1113
076c81ed 11140.02 Tues. March 21, 2006
fc5609d2 1115 * Moose
4734114b 1116 - many more tests, fixing some bugs and
b841b2a3 1117 edge cases
b841b2a3 1118 - &extends now loads the base module with
4734114b 1119 UNIVERSAL::require
1120 - added UNIVERSAL::require to the
b841b2a3 1121 dependencies list
6ba6d68c 1122 ** API CHANGES **
4734114b 1123 - each new Moose class will also create
1124 and register a subtype of Object which
1125 correspond to the new Moose class.
1126 - the 'isa' option in &has now only
1127 accepts strings, and will DWIM in
b841b2a3 1128 almost all cases
4734114b 1129
b841b2a3 1130 * Moose::Util::TypeConstraints
1131 - added type coercion features
1132 - added tests for this
4734114b 1133 - added support for this in attributes
b841b2a3 1134 and instance construction
6ba6d68c 1135 ** API CHANGES **
4734114b 1136 - type construction no longer creates a
b841b2a3 1137 function, it registers the type instead.
4734114b 1138 - added several functions to get the
1139 registered types
6ba6d68c 1140
1141 * Moose::Object
4734114b 1142 - BUILDALL and DEMOLISHALL were broken
6ba6d68c 1143 because of a mis-named hash key, Whoops :)
4734114b 1144
b841b2a3 1145 * Moose::Meta::Attribute
1146 - adding support for coercion in the
1147 autogenerated accessors
4734114b 1148
b841b2a3 1149 * Moose::Meta::Class
1150 - adding support for coercion in the
4734114b 1151 instance construction
6ba6d68c 1152
1153 * Moose::Meta::TypeConstraint
1154 * Moose::Meta::TypeCoercion
4734114b 1155 - type constraints and coercions are now
6ba6d68c 1156 full fledges meta-objects
fc5609d2 1157
e522431d 11580.01 Wed. March 15, 2006
900466d6 1159 - Moooooooooooooooooose!!!