1 Revision history for Perl extension Class-MOP.
6 - now stores the instance of the instance
7 metaclass to avoid needless recomputation
8 and deletes it when the cache is blown
11 - {add, has, get, remove}_package_symbol all
12 now accept a HASH ref argument as well as the
13 string. All internal usages now use the HASH
17 - MOP.xs does sanity checks on the coderef
19 - is_class_loaded check now uses code that
20 was improved in Moose's ClassName type
22 - nonsensical (undef, empty, reference) class
23 names now throw a more direct error in
29 Class::MOP::Method::Wrapped
31 - switched usage of reftype to ref because
34 0.58 Thurs. May 29, 2008
35 (late night release engineering)--
37 - fixing the version is META.yml, no functional
38 changes in this release
40 0.57 Wed. May 28, 2008
41 !! Seveal speedups resulting in 20-25% speedups !!
42 || (thanks to konobi, groditi, mst & CataMoose) !!
45 - made get_method_map use list_all_package_symbols
46 instead of manually grabbing each symbol
47 - streamlining &initialize somewhat, since it gets
51 - made {get, has}_package_symbol not call
53 - inlining a few calls to &name with
54 direct HASH access key access
55 - added get_all_package_symbols to fetch
56 a HASH of items based on a type filter
57 similar to list_all_package_symbols
58 - added tests for this
61 Class::MOP::Method::Constructor
62 Class::MOP::Method::Generated
63 Class::MOP::Method::Accessor
64 - added more descriptive error message to help
65 keep people from wasting time tracking an error
66 that is easily fixed by upgrading.
68 0.56 Saturday, May 24, 2008
70 - we now get the &check_package_cache_flag
71 function from MRO::Compat
72 - All XS based functionality now has a
74 - the CLASS_MOP_NO_XS environment variable
75 can now be used to force non-XS versions
78 * Class::MOP::Attribute
79 - add has_read_method and has_write_method
80 - get_{read,write}_method_ref now wraps the
81 anon-sub ref in the method metaclass when
83 - added tests for this
85 * Class::MOP::Immutable
86 - added the ability to "wrap" methods when
87 making the class immutable
90 - now handling the edge case of ->meta->identifier
91 dying by wrapping add_package_symbol to specifically
93 - added tests for this
95 * Class::MOP::Attribute
98 - any time a method meta object is constructed
99 we make sure to pass the correct package and
100 method name information
103 Class::MOP::Method::Wrapped
104 Class::MOP::Method::Generated
105 Class::MOP::Method::Accessor
106 Class::MOP::Method::Consructor
107 - the &wrap constructor method now requires that a
108 'package_name' and 'name' attribute are passed. This
109 is to help support the no-XS version, and will
110 throw an error if these are not supplied.
111 - all these classes are now bootstrapped properly
112 and now store the package_name and name attributes
115 ~ Build.PL has been removed since the
116 Module::Install support has been removed
118 0.55 Mon. April 28, 2008
119 - All classes now have proper C3 MRO support
120 - added MRO::Compat as a dependency to allow
121 for the C3 MRO support to Just Work in all
125 - rebless_instance now returns the instance
126 it has just blessed, this is mostly to
128 - set the attr correctly in rebless_instance
129 when it has no init_arg
130 - tweaked &linear_isa and &class_precedence_list
131 to support c3 classes.
133 0.54 Fri. March, 14, 2008
136 - making sure that load_class never gets
137 passed a value from @_ or $_ to squash
138 Ovid's bug (http://use.perl.org/~Ovid/journal/35763)
141 - make_{immutable,mutable} now return 1
143 - improved error handling in ->create method
144 - rebless_instance now takes extra params which
145 will be used to populate values
146 - added tests for this
149 - localizing the Data::Dumper configurations so
150 that it does not pollute others (RT #33509)
156 Class::MOP::Attribute
157 - these classes no longer define their own ->meta,
158 but instead just inherit from Class::MOP::Object
160 * Class::MOP::Instance
161 Class::MOP::Immutable
162 - these classes now inherit from Class::MOP::Object
165 - fixed the filename length on several
166 test files so we install on VMS better
168 - fixed incorrect use of catdir when it
169 should be catfile (RT #32385)
171 0.53 Thurs. Feb. 14, 1008
172 ~~ several doc. fixes and updates ~~
175 Class::MOP::Method::Constructor
176 Class::MOP::Attribute
177 - making init_arg accept an undefined value
178 to indicate that no constructor args can
179 be passed (thanks to nothingmuch)
180 - added tests for this
181 - added attribute initializer attribute (rjbs)
184 - making this use the new init_arg => undef
185 feature instead of the silly hack from
186 before (thanks to nothingmuch)
188 0.52 Tues. Jan. 22, 2008
190 - fixed bug in rebless_instance
193 * Class::MOP::Method::Constructor
194 - removed assumptions about the existence of
197 0.51 Mon. Jan. 14, 2008
198 ~~~ some misc. doc. fixes ~~~
199 ~~ updated copyright dates ~~
202 - now sets the IS_RUNNING_ON_5_10
203 constant so that we can take advantage
204 of some of the nice bits of 5.10
207 - uses the IS_RUNNING_ON_5_10 flag to
208 optimize the &linearized_isa method
209 and avoid the hack/check for circular
210 inheritence in &class_precedence_list
211 - added rebless_instance method (Sartak)
212 - added tests for this
214 * Class::MOP::Immutable
215 - the immutable class now keeps track of
216 the transformer which immutablized it
218 * Class::MOP::Instance
219 - added rebless_instance_structure method (Sartak)
220 - added tests for this
222 0.50 Fri. Dec. 21, 2007
224 - fixed bug in immutable to make sure that
225 transformation arguments are saved
227 - added tests for this
229 * Class::MOP::Immutable
230 - fixed a bug (see above)
232 * Class::MOP::Attribute
235 0.49 Fri. Dec. 14, 2007
236 !! Class::MOP now loads 2 x faster !!
237 !! with XS speedups (thanks konobi) !!
240 - removed the dependency on B
241 - added two XS functions (thanks konobi)
242 - get_code_info($code) which replaces all
243 the B fiddling we were doing with
244 faster/leaner XS level fiddling
245 - check_package_cache_flag($pkg_name) which
246 returns the PL_sub_generation variable to
247 be used to help manage method caching.
250 In 5.10 or greater this will actually
251 use the mro::get_pkg_gen instead to give
252 even more accurate caching information.
253 blblack++ for that stuff :)
256 - added the &subclasses method (thanks rlb)
257 - added the update_package_cache_flag and
258 reset_package_cache_flag which help keep
259 track of when we need to re-fetch the
261 - Several small improvements to take advantage
262 of the new method map caching features
264 0.48 Mon. Nov. 26, 2007
265 * Class::MOP::Attribute
266 - fixed get_read/write_method to handle the
267 HASH ref case, which makes the
268 get_read/write_method_ref handle it too.
269 - added more tests for this
271 0.47 Sat. Nov. 24, 2007
272 * Class::MOP::Attribute
273 - fixed misspelling in get_write_method_ref
274 - added more tests for this
276 0.46 Fri. Nov. 23, 2007
278 - added the linearized_isa method instead of constantly
279 pruning duplicate classes (this will be even more
280 useful in the 5.10-compat version coming soon)
282 * Class::MOP::Attribute
283 - added the get_read_method_ref and get_write_method_ref
284 methods which allow you to retrieve a CODE ref which
285 can always be used to read or write an attribute.
287 0.45 Thurs. Nov. 13, 2007
288 * Class::MOP::Attribute
289 - Fix error message on confess (groditi)
291 0.44 Thurs. Nov. 13, 2007
292 - Apparently I didn't make dist correctly (groditi)
294 0.43 Thurs. Nov. 13, 2007
296 - Add support for the 'builder' attribute (groditi)
299 - optimise metaclass-already-exists check in
300 construct_class_instance (groditi)
301 - duplicate check into initialize to save a
302 call through (groditi)
304 * Class::MOP::Attribute
305 - Add support for the 'builder' attribute (groditi)
306 - Make predicates check for the existence of a value, not whether
307 it is defined (groditi)
309 * Class::MOP::Instance
310 - Make predicates check for the existence of a value, not whether
311 it is defined (groditi)
313 * Class::MOP::Method::Accessor
314 - made this a subclass of Class::MOP::Method::Generated
315 - removed the relevant attributes
317 * Class::MOP::Method::Constructor
318 - fixed the cached values we had to be more sane
319 - made this a subclass of Class::MOP::Method::Generated
320 - fixed generated constructor so it properly handles
322 - added tests for this
323 - added the option to allow for both inlined and
324 non-inlined constructors.
325 - Update inlined methods for builder and predicate changes (groditi)
327 * Class::MOP::Method::Generated
328 - added this class as an abstract base for the
329 Class::MOP::Method::{Constructor,Accessor} classes
330 - added tests for this
333 - Alter tests (005, 014 020, 021) for new builder addition (groditi)
334 - Tests for new predicate behavior (and corrections to old tests) (groditi)
337 - Update ArrayRef based class example to work with predicate changes
339 0.42 Mon. July 16, 2007
340 !!! Horray for mst, he fixed it !!!
342 * Class::MOP::Package
343 - alter symbol table handling to deal with 5.8.x and 5.9.x
346 - Get rid of the crappy workaround from 0.40/41
348 0.41 Sun. July 15, 2007
350 Arghh!!! My TODO test didn't work, so I handle
351 it manually now so that people can use this
352 with 5.9.5/bleadperl without issue.
354 0.40 Tues, July 3, 2007
356 ~ marked a test in 003_methods.t as TODO
357 for perl 5.9.5 (this test is irrelvant to
358 the module functioning on 5.9.5 for the most
361 0.39 Mon. June 18, 2007
362 * Class::MOP::Immutable
363 - added make_metaclass_mutable + docs (groditi)
364 - removed unused variable
365 - added create_immutable_transformer
366 necessary for sane overloading of immutable behavior
367 - tests for this (groditi)
370 - Immutability can now be undone,
371 added make_mutable + tests + docs (groditi)
372 - Massive changes to the way Immutable is done
373 for details see comments next to make_immutable
374 This fixes a bug where custom metaclasses broke
375 when made immutable. We are now keeping one immutable
376 metaclass instance per metaclass instead of just one
377 to prevent isa hierarchy corruption. Memory use will go
378 up, but I suspect it will be neglible.
379 - New tests added for this behavior. (groditi)
381 0.38 Thurs. May 31, 2007
382 ~~ More documentation updates ~~
384 * Class::MOP::Package
385 - we now deal with stub methods properly
386 - added tests for this
387 - fixed some tests failing on 5.9.5 (thanks blblack)
389 * Class::MOP::Attribute
390 - added get_read_method and get_write_method
391 thanks to groditi for this code, tests
393 - added tests and POD for this
396 - fixed RT issue #27329, clone object now
397 handles undef values correctly.
398 - added tests for this
399 - Corrected anon-class handling so that they
400 will not get reaped when instances still
401 exist which need to reference them. This is
402 the correct behavior, hopefully this is an
403 obscure enough feature that there are not too
404 many work arounds out in the wild.
405 - added tests for this by groditi
406 - updated docs to explain this
409 - load custom metaclasses automatically (thanks groditi)
410 - added tests for this behavior
412 0.37 Sat. March 10, 2007
413 ~~ Many, many documentation updates ~~
416 - added &load_class and &is_class_loaded
417 - added tests and docs for these
419 * Class::MOP::Attribute
420 - default now checks the instance with defined to
421 avoid setting off bool-overloads (found by Carl Franks)
425 - bad name in a test, causing meaningless failuress.
431 - All attribute names are now consistent and follow Perl 6
432 style (prefixed with the sigil, and ! as the twigil for
433 private attrs). This should not affect any code, unless
434 you broke encapsulation, in which case, it is your problem
437 !! Class::MOP::Class::Immutable has been removed
439 * Class::MOP::Method::Constructor
440 - this has been moved out of Class::MOP::Class::Immutable
441 and is a proper subclass of Class::MOP::Method now.
444 - this module now uses Class::MOP::Immutable for the
445 immutable transformation instead of
446 Class::MOP::Class::Immutable.
448 + Class::MOP::Immutable
449 - this module now controls the transformation from a mutable
450 to an immutable version of the class. Docs for this will
451 be coming eventually.
454 0.36 Sun. Nov. 5, 2006
456 - added a few 'no warnings' lines to keep annoying
457 (and meaningless) warnings from chirping during
461 - some more bootstrapping is now done on the new
464 * Class::MOP::Class::Immutable
466 - constructor generation is now handled by
467 the Class::MOP::Method::Constructor class
469 * Class::MOP::Method::Constructor
470 - created this to handle constructor generation
471 in Class::MOP::Class::Immutable
473 * Class::MOP::Attribute
475 - attributes now delegate to the
476 Class::MOP::Method::Accessor to generate
479 * Class::MOP::Method::Accessor
480 - all accessor generation functions from
481 Class::MOP::Attribute have been moved here
483 0.35 Sat. Sept. 30, 2006
485 * scripts/class_browser.pl
486 - initial prototype of a class browser, more
487 on this to come. Comments and patches are
491 - All Class::MOP::* accessors are no longer
492 re-generated in the bootstrap, instead
493 they are aliased from the originals
494 - fixed tests to reflect
495 - added Class::MOP::Method (and its subclasses)
497 - adjusted tests for this
498 - added the Class::MOP::Instance attributes
503 - methods are no longer blessed CODE refs
504 but are actual objects which can be CODE-ified
505 - adjusted tests to compensate
506 - adjusted docs for this
509 - changed how methods are dealt with to
510 encapsulate most of the work into the
511 &get_method_map method
512 - made several adjustments for the change
513 in Class::MOP::Method
514 - &add_attribute now checks if you are adding
515 a duplicate name, and properly removes the
516 old one before installing the new one
517 - added tests for this
518 - adjusted docs for this
520 * Class::MOP::Class::Immutable
521 - added caching of &get_method_map
522 - fixed issue with &get_package_symbol
523 - cleaned up the methods that die (patch by David Wheeler)
525 * Class::MOP::Package
526 - added filtering capabilities to
527 &list_all_package_symbols
529 0.34 Sat. Aug. 26, 2006
531 - added the %:methods attribute, which like
532 the $:version and such just actually goes
533 to the symbol table to get it's stuff.
534 However, it makes the MOP more complete.
536 - The &create method now requires that all
537 but the package name now is passed in as
538 named parameters. See docs for more info.
539 - updated docs and tests for this
542 - added &dump method to easily Data::Dumper
546 - cleaned up the initialization of attributes
547 which do not store things in the instance
548 - added the %:methods attribute definition to
551 ~ lots of misc. test cleanup
553 0.33 Sat. Aug. 19, 2006
555 - moved the metaclass cache out of here
556 and it is now in Class::MOP itself.
559 - moved all the metaclass cache stuff here
560 - fixed all tests for this
562 * Class::MOP::Attribute
563 - reference values (other than CODE refs)
564 are no longer allowed for defaults
565 - added tests for this
567 * Class::MOP::Package
568 - fixed an issue with perl 5.8.1 and how it deals
569 with symbol tables. The namespace hash is now
570 always reloaded from the symbol table.
572 ~ lots of misc. documentation cleanup
574 0.32 Sat. Aug. 12, 2006
575 + added Class::MOP::Object so that the
576 metamodel is more complete (and closer
577 to what Perl 6 will probably be).
579 * Class::MOP::Package
580 - refactored entire class, this is now
581 the primary gateway between the metaclass
582 and the Perl 5 symbol table
583 - added many tests for this
584 - this class is now a subclass of
586 - added some tests to reflect this
589 - refactored all symbol table access to
590 use Class::MOP::Package methods instead
593 - adding the $:version attribute in the bootstrap
594 so that Module has a version as an attribute
595 - see comment in Class::MOP for details
596 - added the $:authority attribute to this module
597 as well as an &identifier method, to bring us
598 ever closer to Perl 6 goodness
599 - I have added $AUTHORITY to all the modules
600 - added tests for this
602 * Class::MOP::Instance
603 - added &deinitialize_slot for removing slots
605 - added tests for this
607 * Class::MOP::Attribute
608 - added support for &deinitialize_slot for removing
609 slots from an instance
610 - added tests for this
612 0.31 Sat. July 15, 2006
615 - added &find_method_by_name to locate a method
616 anywhere within the class hierarchy
618 * Class::MOP::Attribute
619 - added &set_value and &get_value for getting
620 the value of the attribute for a particular
623 0.30 Wed. July 5, 2006
624 ---------------------------------------
625 This is the first version of Class::MOP
626 to introduce the immutable features which
627 will be used for optimizating the MOP.
628 This support should still be considered
629 experimental, but moving towards stability.
630 ---------------------------------------
632 * Created Class::MOP::Class::Immutable
634 * Created the Class::MOP::Package and
635 Class::MOP::Module classes to more
636 closely conform to Perl 6's meta-model
639 - now inherits from Class::MOP::Module
640 - several methods moved to ::Module and
641 ::Package and now inherited
642 - added tests for this
644 * Class::MOP::Instance
645 - added an is_inlinable method to allow other
646 classes to check before they attempt to optimize.
647 - added an inline_create_instance to inline
648 instance creation (of course)
651 - the Class::MOP::Class::*_package_variable
652 methods are all now methods of Class::MOP::Package
653 and called *_package_symbol instead. This is
654 because they are now more general purpose symbol
655 table manipulation methods.
657 0.29_02 Thurs. June 22, 2006
658 ++ DEVELOPER RELEASE ++
660 - small change in &create so that it behaves
661 properly when inherited
662 - small fix to &clone_instance
664 0.29_01 Fri. May 12, 2006
665 ++ DEVELOPER RELEASE ++
666 - This release works in combination with
667 Moose 0.09_01, it is a developer release
668 because it introduces a new instance
669 sub-protocol and has not yet been
673 - anon-classes are now properly garbage collected
674 - added tests for this
675 - improved method modifier wrapping
677 * Class::MOP::Instance
678 - added new instance protocol
679 - added tests for this
680 - changed all relevant modules and examples
682 - Class::MOP::Attribute
686 - you no longer need to specify the metaclass
687 itself, if it is not there, Class::MOP::Class
689 - updated tests for this
692 - added ArrayBasedStorage example to show
693 instance storage using ARRAY refs instead of
695 - added tests for this
696 - InsideOutClass is totally revised using the
697 new instance protocol
698 - added more tests for this
700 0.26 Mon. April 24, 2006
702 - added find_attribute_by_name method
703 - added tests and docs for this
704 - some small optimizations
706 * Class::MOP::Attribute
707 - some small optimizations
709 0.25 Thurs. April 20, 2006
711 - added create_anon_class for creating anonymous classes
712 - added tests for this
713 - added get_all_metaclasses, get_all_metaclass_names
714 and get_all_metaclass_instances method to allow
715 access to all the cached metaclass objects.
716 - attribute slot initialization is now the responsibility
717 of the attribute itself, and construct_instance now
718 delegates appropriately
720 * Class::MOP::Attribute
721 - attribute slot initialization is now the responsibility
722 of the attribute itself, so we added a method for it
723 called initialize_instance_slot
726 - adjusted all the examples to use the new attribute
727 initialize_instance_slot method
729 0.24 Tues. April 11, 2006
731 - cleaned up how the before/after/around method
732 modifiers get named with Sub::Name
734 0.23 Thurs. March 30, 2006
736 - fixed the way attribute defaults are handled
737 during instance construction (bug found by chansen)
739 * Class::MOP::Attribute
740 - read-only accessors ('reader') will now die if
741 passed more than one argument (attempting to write
743 - added tests for this
744 - adjusted all /example files to comply
746 0.22 Mon. March 20, 2006
748 - localized $@ in the *_package_variable functions
749 because otherwise, it does ugly things in Moose.
750 - added test case for this
752 0.21 Wed. March 15, 2006
754 - fixed issue where metaclasses are reaped from
755 our cache in global destruction, and so are not
756 available in DESTORY calls
758 0.20 Thurs. March 2, 2006
759 - removed the dependency for Clone since
760 we no longer to deep-cloning by default.
763 - added &package_name, &name and
764 &fully_qualified_name methods, some of
765 which were formerly private subs in
768 * Class::MOP::Method::Wrapped
769 - allows for a method to be wrapped with
770 before, after and around modifiers
771 - added tests and docs for this feature
774 - improved &get_package_symbol
775 - &version and &superclasses now use it
776 - methods are now blessed into Class::MOP::Method
778 - added methods to install CLOS-style method modifiers
779 - &add_before_method_modifier
780 - &add_after_method_modifier
781 - &add_around_method_modifier
782 - added tests and docs for these
783 - added &find_next_method_by_name which finds the
784 equivalent of SUPER::method_name
786 0.12 Thurs. Feb 23, 2006
787 - reduced the dependency on B, no need to always
791 - added docs to the C3 method dispatch order test
792 - fixed missing Algorithm::C3 dependency by making
793 the test skip if it is not installed
795 0.11 Mon Feb. 20, 2006
797 - added example of changing method dispatch order to C3
800 - changed how clone_instance behaves, it now only does a
801 shallow clone (see docs for more details)
802 - added docs and tests
804 0.10 Tues Feb. 14, 2006
805 ** This release was mostly about writing more tests and
806 cleaning out old and dusty code, the MOP should now
807 be considered "ready to use".
809 - adding more tests to get coverage up a little higher,
810 mostly testing errors and edge cases.
811 - test coverage is now at 99%
814 - no longer optionally exports to UNIVERSAL::meta or
815 creates a custom metaclass generator, use the
816 metaclass pragma instead.
819 - fixed a number of minor issues which came up in the
820 error/edge-case tests
822 * Class::MOP::Attribute
823 - fixed a number of minor issues which came up in the
824 error/edge-case tests
827 - fixing the AttributesWithHistory example, it was broken.
829 0.06 Thurs Feb. 9, 2006
831 - adding new metaclass pragma to make setting up the
832 metaclass a little more straightforward
835 - clean up bootstrapping to include more complete
836 attribute definitions for Class::MOP::Class and
837 Class::MOP::Attribute (accessors, readers, writers,
838 etc.) ... it is redundant, but is useful meta-info
842 - fixing minor meta-circularity issue with &meta, it
843 is now more useful for subclasses
844 - added &get_attribute_map as an accessor for the
845 hash of attribute meta objects
846 - &compute_all_applicable_attributes now just returns
847 the attribute meta-object, rather than the HASH ref
848 since all the same info can be gotten from the
849 attribute meta-object itself
850 - updated docs & tests to reflect
851 - added &clone_instance method which does a deep clone
852 of the instance structure created by &construct_instance
853 - added docs & tests for this
854 - added Clone as a dependency
855 - added &new_object and &clone_object convience methods to
856 return blessed new or cloned instances
857 - they handle Class::MOP::Class singletons correctly too
858 - added docs & tests for this
859 - cleaned up the &constuct_class_instance so that it behaves
860 more like &construct_instance (and managed the singletons too)
861 - added the &check_metaclass_compatibility method to make sure
862 that metaclasses are upward and downward compatible.
863 - added tests and docs for this
866 - adjusting code to use the &Class::MOP::Class::meta
868 - adjusting code to use the metaclass pragma
870 0.05 Sat Feb. 4, 2006
872 - added the &attribute_metaclass and &method_metaclass
873 attributes which contain a metaclass name to use for
874 attributes/methods respectively
877 - bootstrap additional attributes for Class::MOP::Class
880 - adjusted the example code and tests to use the new
881 &attribute_metaclass feature of Class::MOP::Class
885 0.04 Fri Feb. 3, 2006
887 - some documentation suggestions from #perl6
889 * Class::MOP::Attribute
890 - improved error messages
893 - added new examples:
894 - AttributesWithHistory
895 - ClassEncapsultedAttributes
897 0.03 Fri Feb. 3, 2006
898 - converted to Module::Build instead of EU::MM
900 * Class::MOP::Attribute
901 - refactored method generation code
902 - attributes are now associated with class directly
905 - refactored the InsideOut example to take advantage
906 of the Class::MOP::Attribute refactoring
907 - changed example files to .pod files and hide thier
908 package names from PAUSE (I don't want to own these
909 namespaces really, they are just examples)
911 0.02 Thurs Feb. 2, 2006
912 - moving examples from t/lib/* to examples/*
913 - adding POD documentation to the examples
915 0.01 Thurs Feb. 2, 2006