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