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