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