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