1 Revision history for Perl extension Class-MOP.
6 - now stores the instance of the instance
7 metaclass to avoid needless recomputation
12 Class::MOP::Method::Wrapped
14 - switched usage of reftype to ref because
17 0.58 Thurs. May 29, 2008
18 (late night release engineering)--
20 - fixing the version is META.yml, no functional
21 changes in this release
23 0.57 Wed. May 28, 2008
24 !! Seveal speedups resulting in 20-25% speedups !!
25 || (thanks to konobi, groditi, mst & CataMoose) !!
28 - made get_method_map use list_all_package_symbols
29 instead of manually grabbing each symbol
30 - streamlining &initialize somewhat, since it gets
34 - made {get, has}_package_symbol not call
36 - inlining a few calls to &name with
37 direct HASH access key access
38 - added get_all_package_symbols to fetch
39 a HASH of items based on a type filter
40 similar to list_all_package_symbols
41 - added tests for this
44 Class::MOP::Method::Constructor
45 Class::MOP::Method::Generated
46 Class::MOP::Method::Accessor
47 - added more descriptive error message to help
48 keep people from wasting time tracking an error
49 that is easily fixed by upgrading.
51 0.56 Saturday, May 24, 2008
53 - we now get the &check_package_cache_flag
54 function from MRO::Compat
55 - All XS based functionality now has a
57 - the CLASS_MOP_NO_XS environment variable
58 can now be used to force non-XS versions
61 * Class::MOP::Attribute
62 - add has_read_method and has_write_method
63 - get_{read,write}_method_ref now wraps the
64 anon-sub ref in the method metaclass when
66 - added tests for this
68 * Class::MOP::Immutable
69 - added the ability to "wrap" methods when
70 making the class immutable
73 - now handling the edge case of ->meta->identifier
74 dying by wrapping add_package_symbol to specifically
76 - added tests for this
78 * Class::MOP::Attribute
81 - any time a method meta object is constructed
82 we make sure to pass the correct package and
83 method name information
86 Class::MOP::Method::Wrapped
87 Class::MOP::Method::Generated
88 Class::MOP::Method::Accessor
89 Class::MOP::Method::Consructor
90 - the &wrap constructor method now requires that a
91 'package_name' and 'name' attribute are passed. This
92 is to help support the no-XS version, and will
93 throw an error if these are not supplied.
94 - all these classes are now bootstrapped properly
95 and now store the package_name and name attributes
98 ~ Build.PL has been removed since the
99 Module::Install support has been removed
101 0.55 Mon. April 28, 2008
102 - All classes now have proper C3 MRO support
103 - added MRO::Compat as a dependency to allow
104 for the C3 MRO support to Just Work in all
108 - rebless_instance now returns the instance
109 it has just blessed, this is mostly to
111 - set the attr correctly in rebless_instance
112 when it has no init_arg
113 - tweaked &linear_isa and &class_precedence_list
114 to support c3 classes.
116 0.54 Fri. March, 14, 2008
119 - making sure that load_class never gets
120 passed a value from @_ or $_ to squash
121 Ovid's bug (http://use.perl.org/~Ovid/journal/35763)
124 - make_{immutable,mutable} now return 1
126 - improved error handling in ->create method
127 - rebless_instance now takes extra params which
128 will be used to populate values
129 - added tests for this
132 - localizing the Data::Dumper configurations so
133 that it does not pollute others (RT #33509)
139 Class::MOP::Attribute
140 - these classes no longer define their own ->meta,
141 but instead just inherit from Class::MOP::Object
143 * Class::MOP::Instance
144 Class::MOP::Immutable
145 - these classes now inherit from Class::MOP::Object
148 - fixed the filename length on several
149 test files so we install on VMS better
151 - fixed incorrect use of catdir when it
152 should be catfile (RT #32385)
154 0.53 Thurs. Feb. 14, 1008
155 ~~ several doc. fixes and updates ~~
158 Class::MOP::Method::Constructor
159 Class::MOP::Attribute
160 - making init_arg accept an undefined value
161 to indicate that no constructor args can
162 be passed (thanks to nothingmuch)
163 - added tests for this
164 - added attribute initializer attribute (rjbs)
167 - making this use the new init_arg => undef
168 feature instead of the silly hack from
169 before (thanks to nothingmuch)
171 0.52 Tues. Jan. 22, 2008
173 - fixed bug in rebless_instance
176 * Class::MOP::Method::Constructor
177 - removed assumptions about the existence of
180 0.51 Mon. Jan. 14, 2008
181 ~~~ some misc. doc. fixes ~~~
182 ~~ updated copyright dates ~~
185 - now sets the IS_RUNNING_ON_5_10
186 constant so that we can take advantage
187 of some of the nice bits of 5.10
190 - uses the IS_RUNNING_ON_5_10 flag to
191 optimize the &linearized_isa method
192 and avoid the hack/check for circular
193 inheritence in &class_precedence_list
194 - added rebless_instance method (Sartak)
195 - added tests for this
197 * Class::MOP::Immutable
198 - the immutable class now keeps track of
199 the transformer which immutablized it
201 * Class::MOP::Instance
202 - added rebless_instance_structure method (Sartak)
203 - added tests for this
205 0.50 Fri. Dec. 21, 2007
207 - fixed bug in immutable to make sure that
208 transformation arguments are saved
210 - added tests for this
212 * Class::MOP::Immutable
213 - fixed a bug (see above)
215 * Class::MOP::Attribute
218 0.49 Fri. Dec. 14, 2007
219 !! Class::MOP now loads 2 x faster !!
220 !! with XS speedups (thanks konobi) !!
223 - removed the dependency on B
224 - added two XS functions (thanks konobi)
225 - get_code_info($code) which replaces all
226 the B fiddling we were doing with
227 faster/leaner XS level fiddling
228 - check_package_cache_flag($pkg_name) which
229 returns the PL_sub_generation variable to
230 be used to help manage method caching.
233 In 5.10 or greater this will actually
234 use the mro::get_pkg_gen instead to give
235 even more accurate caching information.
236 blblack++ for that stuff :)
239 - added the &subclasses method (thanks rlb)
240 - added the update_package_cache_flag and
241 reset_package_cache_flag which help keep
242 track of when we need to re-fetch the
244 - Several small improvements to take advantage
245 of the new method map caching features
247 0.48 Mon. Nov. 26, 2007
248 * Class::MOP::Attribute
249 - fixed get_read/write_method to handle the
250 HASH ref case, which makes the
251 get_read/write_method_ref handle it too.
252 - added more tests for this
254 0.47 Sat. Nov. 24, 2007
255 * Class::MOP::Attribute
256 - fixed misspelling in get_write_method_ref
257 - added more tests for this
259 0.46 Fri. Nov. 23, 2007
261 - added the linearized_isa method instead of constantly
262 pruning duplicate classes (this will be even more
263 useful in the 5.10-compat version coming soon)
265 * Class::MOP::Attribute
266 - added the get_read_method_ref and get_write_method_ref
267 methods which allow you to retrieve a CODE ref which
268 can always be used to read or write an attribute.
270 0.45 Thurs. Nov. 13, 2007
271 * Class::MOP::Attribute
272 - Fix error message on confess (groditi)
274 0.44 Thurs. Nov. 13, 2007
275 - Apparently I didn't make dist correctly (groditi)
277 0.43 Thurs. Nov. 13, 2007
279 - Add support for the 'builder' attribute (groditi)
282 - optimise metaclass-already-exists check in
283 construct_class_instance (groditi)
284 - duplicate check into initialize to save a
285 call through (groditi)
287 * Class::MOP::Attribute
288 - Add support for the 'builder' attribute (groditi)
289 - Make predicates check for the existence of a value, not whether
290 it is defined (groditi)
292 * Class::MOP::Instance
293 - Make predicates check for the existence of a value, not whether
294 it is defined (groditi)
296 * Class::MOP::Method::Accessor
297 - made this a subclass of Class::MOP::Method::Generated
298 - removed the relevant attributes
300 * Class::MOP::Method::Constructor
301 - fixed the cached values we had to be more sane
302 - made this a subclass of Class::MOP::Method::Generated
303 - fixed generated constructor so it properly handles
305 - added tests for this
306 - added the option to allow for both inlined and
307 non-inlined constructors.
308 - Update inlined methods for builder and predicate changes (groditi)
310 * Class::MOP::Method::Generated
311 - added this class as an abstract base for the
312 Class::MOP::Method::{Constructor,Accessor} classes
313 - added tests for this
316 - Alter tests (005, 014 020, 021) for new builder addition (groditi)
317 - Tests for new predicate behavior (and corrections to old tests) (groditi)
320 - Update ArrayRef based class example to work with predicate changes
322 0.42 Mon. July 16, 2007
323 !!! Horray for mst, he fixed it !!!
325 * Class::MOP::Package
326 - alter symbol table handling to deal with 5.8.x and 5.9.x
329 - Get rid of the crappy workaround from 0.40/41
331 0.41 Sun. July 15, 2007
333 Arghh!!! My TODO test didn't work, so I handle
334 it manually now so that people can use this
335 with 5.9.5/bleadperl without issue.
337 0.40 Tues, July 3, 2007
339 ~ marked a test in 003_methods.t as TODO
340 for perl 5.9.5 (this test is irrelvant to
341 the module functioning on 5.9.5 for the most
344 0.39 Mon. June 18, 2007
345 * Class::MOP::Immutable
346 - added make_metaclass_mutable + docs (groditi)
347 - removed unused variable
348 - added create_immutable_transformer
349 necessary for sane overloading of immutable behavior
350 - tests for this (groditi)
353 - Immutability can now be undone,
354 added make_mutable + tests + docs (groditi)
355 - Massive changes to the way Immutable is done
356 for details see comments next to make_immutable
357 This fixes a bug where custom metaclasses broke
358 when made immutable. We are now keeping one immutable
359 metaclass instance per metaclass instead of just one
360 to prevent isa hierarchy corruption. Memory use will go
361 up, but I suspect it will be neglible.
362 - New tests added for this behavior. (groditi)
364 0.38 Thurs. May 31, 2007
365 ~~ More documentation updates ~~
367 * Class::MOP::Package
368 - we now deal with stub methods properly
369 - added tests for this
370 - fixed some tests failing on 5.9.5 (thanks blblack)
372 * Class::MOP::Attribute
373 - added get_read_method and get_write_method
374 thanks to groditi for this code, tests
376 - added tests and POD for this
379 - fixed RT issue #27329, clone object now
380 handles undef values correctly.
381 - added tests for this
382 - Corrected anon-class handling so that they
383 will not get reaped when instances still
384 exist which need to reference them. This is
385 the correct behavior, hopefully this is an
386 obscure enough feature that there are not too
387 many work arounds out in the wild.
388 - added tests for this by groditi
389 - updated docs to explain this
392 - load custom metaclasses automatically (thanks groditi)
393 - added tests for this behavior
395 0.37 Sat. March 10, 2007
396 ~~ Many, many documentation updates ~~
399 - added &load_class and &is_class_loaded
400 - added tests and docs for these
402 * Class::MOP::Attribute
403 - default now checks the instance with defined to
404 avoid setting off bool-overloads (found by Carl Franks)
408 - bad name in a test, causing meaningless failuress.
414 - All attribute names are now consistent and follow Perl 6
415 style (prefixed with the sigil, and ! as the twigil for
416 private attrs). This should not affect any code, unless
417 you broke encapsulation, in which case, it is your problem
420 !! Class::MOP::Class::Immutable has been removed
422 * Class::MOP::Method::Constructor
423 - this has been moved out of Class::MOP::Class::Immutable
424 and is a proper subclass of Class::MOP::Method now.
427 - this module now uses Class::MOP::Immutable for the
428 immutable transformation instead of
429 Class::MOP::Class::Immutable.
431 + Class::MOP::Immutable
432 - this module now controls the transformation from a mutable
433 to an immutable version of the class. Docs for this will
434 be coming eventually.
437 0.36 Sun. Nov. 5, 2006
439 - added a few 'no warnings' lines to keep annoying
440 (and meaningless) warnings from chirping during
444 - some more bootstrapping is now done on the new
447 * Class::MOP::Class::Immutable
449 - constructor generation is now handled by
450 the Class::MOP::Method::Constructor class
452 * Class::MOP::Method::Constructor
453 - created this to handle constructor generation
454 in Class::MOP::Class::Immutable
456 * Class::MOP::Attribute
458 - attributes now delegate to the
459 Class::MOP::Method::Accessor to generate
462 * Class::MOP::Method::Accessor
463 - all accessor generation functions from
464 Class::MOP::Attribute have been moved here
466 0.35 Sat. Sept. 30, 2006
468 * scripts/class_browser.pl
469 - initial prototype of a class browser, more
470 on this to come. Comments and patches are
474 - All Class::MOP::* accessors are no longer
475 re-generated in the bootstrap, instead
476 they are aliased from the originals
477 - fixed tests to reflect
478 - added Class::MOP::Method (and its subclasses)
480 - adjusted tests for this
481 - added the Class::MOP::Instance attributes
486 - methods are no longer blessed CODE refs
487 but are actual objects which can be CODE-ified
488 - adjusted tests to compensate
489 - adjusted docs for this
492 - changed how methods are dealt with to
493 encapsulate most of the work into the
494 &get_method_map method
495 - made several adjustments for the change
496 in Class::MOP::Method
497 - &add_attribute now checks if you are adding
498 a duplicate name, and properly removes the
499 old one before installing the new one
500 - added tests for this
501 - adjusted docs for this
503 * Class::MOP::Class::Immutable
504 - added caching of &get_method_map
505 - fixed issue with &get_package_symbol
506 - cleaned up the methods that die (patch by David Wheeler)
508 * Class::MOP::Package
509 - added filtering capabilities to
510 &list_all_package_symbols
512 0.34 Sat. Aug. 26, 2006
514 - added the %:methods attribute, which like
515 the $:version and such just actually goes
516 to the symbol table to get it's stuff.
517 However, it makes the MOP more complete.
519 - The &create method now requires that all
520 but the package name now is passed in as
521 named parameters. See docs for more info.
522 - updated docs and tests for this
525 - added &dump method to easily Data::Dumper
529 - cleaned up the initialization of attributes
530 which do not store things in the instance
531 - added the %:methods attribute definition to
534 ~ lots of misc. test cleanup
536 0.33 Sat. Aug. 19, 2006
538 - moved the metaclass cache out of here
539 and it is now in Class::MOP itself.
542 - moved all the metaclass cache stuff here
543 - fixed all tests for this
545 * Class::MOP::Attribute
546 - reference values (other than CODE refs)
547 are no longer allowed for defaults
548 - added tests for this
550 * Class::MOP::Package
551 - fixed an issue with perl 5.8.1 and how it deals
552 with symbol tables. The namespace hash is now
553 always reloaded from the symbol table.
555 ~ lots of misc. documentation cleanup
557 0.32 Sat. Aug. 12, 2006
558 + added Class::MOP::Object so that the
559 metamodel is more complete (and closer
560 to what Perl 6 will probably be).
562 * Class::MOP::Package
563 - refactored entire class, this is now
564 the primary gateway between the metaclass
565 and the Perl 5 symbol table
566 - added many tests for this
567 - this class is now a subclass of
569 - added some tests to reflect this
572 - refactored all symbol table access to
573 use Class::MOP::Package methods instead
576 - adding the $:version attribute in the bootstrap
577 so that Module has a version as an attribute
578 - see comment in Class::MOP for details
579 - added the $:authority attribute to this module
580 as well as an &identifier method, to bring us
581 ever closer to Perl 6 goodness
582 - I have added $AUTHORITY to all the modules
583 - added tests for this
585 * Class::MOP::Instance
586 - added &deinitialize_slot for removing slots
588 - added tests for this
590 * Class::MOP::Attribute
591 - added support for &deinitialize_slot for removing
592 slots from an instance
593 - added tests for this
595 0.31 Sat. July 15, 2006
598 - added &find_method_by_name to locate a method
599 anywhere within the class hierarchy
601 * Class::MOP::Attribute
602 - added &set_value and &get_value for getting
603 the value of the attribute for a particular
606 0.30 Wed. July 5, 2006
607 ---------------------------------------
608 This is the first version of Class::MOP
609 to introduce the immutable features which
610 will be used for optimizating the MOP.
611 This support should still be considered
612 experimental, but moving towards stability.
613 ---------------------------------------
615 * Created Class::MOP::Class::Immutable
617 * Created the Class::MOP::Package and
618 Class::MOP::Module classes to more
619 closely conform to Perl 6's meta-model
622 - now inherits from Class::MOP::Module
623 - several methods moved to ::Module and
624 ::Package and now inherited
625 - added tests for this
627 * Class::MOP::Instance
628 - added an is_inlinable method to allow other
629 classes to check before they attempt to optimize.
630 - added an inline_create_instance to inline
631 instance creation (of course)
634 - the Class::MOP::Class::*_package_variable
635 methods are all now methods of Class::MOP::Package
636 and called *_package_symbol instead. This is
637 because they are now more general purpose symbol
638 table manipulation methods.
640 0.29_02 Thurs. June 22, 2006
641 ++ DEVELOPER RELEASE ++
643 - small change in &create so that it behaves
644 properly when inherited
645 - small fix to &clone_instance
647 0.29_01 Fri. May 12, 2006
648 ++ DEVELOPER RELEASE ++
649 - This release works in combination with
650 Moose 0.09_01, it is a developer release
651 because it introduces a new instance
652 sub-protocol and has not yet been
656 - anon-classes are now properly garbage collected
657 - added tests for this
658 - improved method modifier wrapping
660 * Class::MOP::Instance
661 - added new instance protocol
662 - added tests for this
663 - changed all relevant modules and examples
665 - Class::MOP::Attribute
669 - you no longer need to specify the metaclass
670 itself, if it is not there, Class::MOP::Class
672 - updated tests for this
675 - added ArrayBasedStorage example to show
676 instance storage using ARRAY refs instead of
678 - added tests for this
679 - InsideOutClass is totally revised using the
680 new instance protocol
681 - added more tests for this
683 0.26 Mon. April 24, 2006
685 - added find_attribute_by_name method
686 - added tests and docs for this
687 - some small optimizations
689 * Class::MOP::Attribute
690 - some small optimizations
692 0.25 Thurs. April 20, 2006
694 - added create_anon_class for creating anonymous classes
695 - added tests for this
696 - added get_all_metaclasses, get_all_metaclass_names
697 and get_all_metaclass_instances method to allow
698 access to all the cached metaclass objects.
699 - attribute slot initialization is now the responsibility
700 of the attribute itself, and construct_instance now
701 delegates appropriately
703 * Class::MOP::Attribute
704 - attribute slot initialization is now the responsibility
705 of the attribute itself, so we added a method for it
706 called initialize_instance_slot
709 - adjusted all the examples to use the new attribute
710 initialize_instance_slot method
712 0.24 Tues. April 11, 2006
714 - cleaned up how the before/after/around method
715 modifiers get named with Sub::Name
717 0.23 Thurs. March 30, 2006
719 - fixed the way attribute defaults are handled
720 during instance construction (bug found by chansen)
722 * Class::MOP::Attribute
723 - read-only accessors ('reader') will now die if
724 passed more than one argument (attempting to write
726 - added tests for this
727 - adjusted all /example files to comply
729 0.22 Mon. March 20, 2006
731 - localized $@ in the *_package_variable functions
732 because otherwise, it does ugly things in Moose.
733 - added test case for this
735 0.21 Wed. March 15, 2006
737 - fixed issue where metaclasses are reaped from
738 our cache in global destruction, and so are not
739 available in DESTORY calls
741 0.20 Thurs. March 2, 2006
742 - removed the dependency for Clone since
743 we no longer to deep-cloning by default.
746 - added &package_name, &name and
747 &fully_qualified_name methods, some of
748 which were formerly private subs in
751 * Class::MOP::Method::Wrapped
752 - allows for a method to be wrapped with
753 before, after and around modifiers
754 - added tests and docs for this feature
757 - improved &get_package_symbol
758 - &version and &superclasses now use it
759 - methods are now blessed into Class::MOP::Method
761 - added methods to install CLOS-style method modifiers
762 - &add_before_method_modifier
763 - &add_after_method_modifier
764 - &add_around_method_modifier
765 - added tests and docs for these
766 - added &find_next_method_by_name which finds the
767 equivalent of SUPER::method_name
769 0.12 Thurs. Feb 23, 2006
770 - reduced the dependency on B, no need to always
774 - added docs to the C3 method dispatch order test
775 - fixed missing Algorithm::C3 dependency by making
776 the test skip if it is not installed
778 0.11 Mon Feb. 20, 2006
780 - added example of changing method dispatch order to C3
783 - changed how clone_instance behaves, it now only does a
784 shallow clone (see docs for more details)
785 - added docs and tests
787 0.10 Tues Feb. 14, 2006
788 ** This release was mostly about writing more tests and
789 cleaning out old and dusty code, the MOP should now
790 be considered "ready to use".
792 - adding more tests to get coverage up a little higher,
793 mostly testing errors and edge cases.
794 - test coverage is now at 99%
797 - no longer optionally exports to UNIVERSAL::meta or
798 creates a custom metaclass generator, use the
799 metaclass pragma instead.
802 - fixed a number of minor issues which came up in the
803 error/edge-case tests
805 * Class::MOP::Attribute
806 - fixed a number of minor issues which came up in the
807 error/edge-case tests
810 - fixing the AttributesWithHistory example, it was broken.
812 0.06 Thurs Feb. 9, 2006
814 - adding new metaclass pragma to make setting up the
815 metaclass a little more straightforward
818 - clean up bootstrapping to include more complete
819 attribute definitions for Class::MOP::Class and
820 Class::MOP::Attribute (accessors, readers, writers,
821 etc.) ... it is redundant, but is useful meta-info
825 - fixing minor meta-circularity issue with &meta, it
826 is now more useful for subclasses
827 - added &get_attribute_map as an accessor for the
828 hash of attribute meta objects
829 - &compute_all_applicable_attributes now just returns
830 the attribute meta-object, rather than the HASH ref
831 since all the same info can be gotten from the
832 attribute meta-object itself
833 - updated docs & tests to reflect
834 - added &clone_instance method which does a deep clone
835 of the instance structure created by &construct_instance
836 - added docs & tests for this
837 - added Clone as a dependency
838 - added &new_object and &clone_object convience methods to
839 return blessed new or cloned instances
840 - they handle Class::MOP::Class singletons correctly too
841 - added docs & tests for this
842 - cleaned up the &constuct_class_instance so that it behaves
843 more like &construct_instance (and managed the singletons too)
844 - added the &check_metaclass_compatibility method to make sure
845 that metaclasses are upward and downward compatible.
846 - added tests and docs for this
849 - adjusting code to use the &Class::MOP::Class::meta
851 - adjusting code to use the metaclass pragma
853 0.05 Sat Feb. 4, 2006
855 - added the &attribute_metaclass and &method_metaclass
856 attributes which contain a metaclass name to use for
857 attributes/methods respectively
860 - bootstrap additional attributes for Class::MOP::Class
863 - adjusted the example code and tests to use the new
864 &attribute_metaclass feature of Class::MOP::Class
868 0.04 Fri Feb. 3, 2006
870 - some documentation suggestions from #perl6
872 * Class::MOP::Attribute
873 - improved error messages
876 - added new examples:
877 - AttributesWithHistory
878 - ClassEncapsultedAttributes
880 0.03 Fri Feb. 3, 2006
881 - converted to Module::Build instead of EU::MM
883 * Class::MOP::Attribute
884 - refactored method generation code
885 - attributes are now associated with class directly
888 - refactored the InsideOut example to take advantage
889 of the Class::MOP::Attribute refactoring
890 - changed example files to .pod files and hide thier
891 package names from PAUSE (I don't want to own these
892 namespaces really, they are just examples)
894 0.02 Thurs Feb. 2, 2006
895 - moving examples from t/lib/* to examples/*
896 - adding POD documentation to the examples
898 0.01 Thurs Feb. 2, 2006