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