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