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