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