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