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