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