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