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