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
23 Class::MOP::Method::Wrapped
25 - switched usage of reftype to ref because
28 0.58 Thurs. May 29, 2008
29 (late night release engineering)--
31 - fixing the version is META.yml, no functional
32 changes in this release
34 0.57 Wed. May 28, 2008
35 !! Seveal speedups resulting in 20-25% speedups !!
36 || (thanks to konobi, groditi, mst & CataMoose) !!
39 - made get_method_map use list_all_package_symbols
40 instead of manually grabbing each symbol
41 - streamlining &initialize somewhat, since it gets
45 - made {get, has}_package_symbol not call
47 - inlining a few calls to &name with
48 direct HASH access key access
49 - added get_all_package_symbols to fetch
50 a HASH of items based on a type filter
51 similar to list_all_package_symbols
52 - added tests for this
55 Class::MOP::Method::Constructor
56 Class::MOP::Method::Generated
57 Class::MOP::Method::Accessor
58 - added more descriptive error message to help
59 keep people from wasting time tracking an error
60 that is easily fixed by upgrading.
62 0.56 Saturday, May 24, 2008
64 - we now get the &check_package_cache_flag
65 function from MRO::Compat
66 - All XS based functionality now has a
68 - the CLASS_MOP_NO_XS environment variable
69 can now be used to force non-XS versions
72 * Class::MOP::Attribute
73 - add has_read_method and has_write_method
74 - get_{read,write}_method_ref now wraps the
75 anon-sub ref in the method metaclass when
77 - added tests for this
79 * Class::MOP::Immutable
80 - added the ability to "wrap" methods when
81 making the class immutable
84 - now handling the edge case of ->meta->identifier
85 dying by wrapping add_package_symbol to specifically
87 - added tests for this
89 * Class::MOP::Attribute
92 - any time a method meta object is constructed
93 we make sure to pass the correct package and
94 method name information
97 Class::MOP::Method::Wrapped
98 Class::MOP::Method::Generated
99 Class::MOP::Method::Accessor
100 Class::MOP::Method::Consructor
101 - the &wrap constructor method now requires that a
102 'package_name' and 'name' attribute are passed. This
103 is to help support the no-XS version, and will
104 throw an error if these are not supplied.
105 - all these classes are now bootstrapped properly
106 and now store the package_name and name attributes
109 ~ Build.PL has been removed since the
110 Module::Install support has been removed
112 0.55 Mon. April 28, 2008
113 - All classes now have proper C3 MRO support
114 - added MRO::Compat as a dependency to allow
115 for the C3 MRO support to Just Work in all
119 - rebless_instance now returns the instance
120 it has just blessed, this is mostly to
122 - set the attr correctly in rebless_instance
123 when it has no init_arg
124 - tweaked &linear_isa and &class_precedence_list
125 to support c3 classes.
127 0.54 Fri. March, 14, 2008
130 - making sure that load_class never gets
131 passed a value from @_ or $_ to squash
132 Ovid's bug (http://use.perl.org/~Ovid/journal/35763)
135 - make_{immutable,mutable} now return 1
137 - improved error handling in ->create method
138 - rebless_instance now takes extra params which
139 will be used to populate values
140 - added tests for this
143 - localizing the Data::Dumper configurations so
144 that it does not pollute others (RT #33509)
150 Class::MOP::Attribute
151 - these classes no longer define their own ->meta,
152 but instead just inherit from Class::MOP::Object
154 * Class::MOP::Instance
155 Class::MOP::Immutable
156 - these classes now inherit from Class::MOP::Object
159 - fixed the filename length on several
160 test files so we install on VMS better
162 - fixed incorrect use of catdir when it
163 should be catfile (RT #32385)
165 0.53 Thurs. Feb. 14, 1008
166 ~~ several doc. fixes and updates ~~
169 Class::MOP::Method::Constructor
170 Class::MOP::Attribute
171 - making init_arg accept an undefined value
172 to indicate that no constructor args can
173 be passed (thanks to nothingmuch)
174 - added tests for this
175 - added attribute initializer attribute (rjbs)
178 - making this use the new init_arg => undef
179 feature instead of the silly hack from
180 before (thanks to nothingmuch)
182 0.52 Tues. Jan. 22, 2008
184 - fixed bug in rebless_instance
187 * Class::MOP::Method::Constructor
188 - removed assumptions about the existence of
191 0.51 Mon. Jan. 14, 2008
192 ~~~ some misc. doc. fixes ~~~
193 ~~ updated copyright dates ~~
196 - now sets the IS_RUNNING_ON_5_10
197 constant so that we can take advantage
198 of some of the nice bits of 5.10
201 - uses the IS_RUNNING_ON_5_10 flag to
202 optimize the &linearized_isa method
203 and avoid the hack/check for circular
204 inheritence in &class_precedence_list
205 - added rebless_instance method (Sartak)
206 - added tests for this
208 * Class::MOP::Immutable
209 - the immutable class now keeps track of
210 the transformer which immutablized it
212 * Class::MOP::Instance
213 - added rebless_instance_structure method (Sartak)
214 - added tests for this
216 0.50 Fri. Dec. 21, 2007
218 - fixed bug in immutable to make sure that
219 transformation arguments are saved
221 - added tests for this
223 * Class::MOP::Immutable
224 - fixed a bug (see above)
226 * Class::MOP::Attribute
229 0.49 Fri. Dec. 14, 2007
230 !! Class::MOP now loads 2 x faster !!
231 !! with XS speedups (thanks konobi) !!
234 - removed the dependency on B
235 - added two XS functions (thanks konobi)
236 - get_code_info($code) which replaces all
237 the B fiddling we were doing with
238 faster/leaner XS level fiddling
239 - check_package_cache_flag($pkg_name) which
240 returns the PL_sub_generation variable to
241 be used to help manage method caching.
244 In 5.10 or greater this will actually
245 use the mro::get_pkg_gen instead to give
246 even more accurate caching information.
247 blblack++ for that stuff :)
250 - added the &subclasses method (thanks rlb)
251 - added the update_package_cache_flag and
252 reset_package_cache_flag which help keep
253 track of when we need to re-fetch the
255 - Several small improvements to take advantage
256 of the new method map caching features
258 0.48 Mon. Nov. 26, 2007
259 * Class::MOP::Attribute
260 - fixed get_read/write_method to handle the
261 HASH ref case, which makes the
262 get_read/write_method_ref handle it too.
263 - added more tests for this
265 0.47 Sat. Nov. 24, 2007
266 * Class::MOP::Attribute
267 - fixed misspelling in get_write_method_ref
268 - added more tests for this
270 0.46 Fri. Nov. 23, 2007
272 - added the linearized_isa method instead of constantly
273 pruning duplicate classes (this will be even more
274 useful in the 5.10-compat version coming soon)
276 * Class::MOP::Attribute
277 - added the get_read_method_ref and get_write_method_ref
278 methods which allow you to retrieve a CODE ref which
279 can always be used to read or write an attribute.
281 0.45 Thurs. Nov. 13, 2007
282 * Class::MOP::Attribute
283 - Fix error message on confess (groditi)
285 0.44 Thurs. Nov. 13, 2007
286 - Apparently I didn't make dist correctly (groditi)
288 0.43 Thurs. Nov. 13, 2007
290 - Add support for the 'builder' attribute (groditi)
293 - optimise metaclass-already-exists check in
294 construct_class_instance (groditi)
295 - duplicate check into initialize to save a
296 call through (groditi)
298 * Class::MOP::Attribute
299 - Add support for the 'builder' attribute (groditi)
300 - Make predicates check for the existence of a value, not whether
301 it is defined (groditi)
303 * Class::MOP::Instance
304 - Make predicates check for the existence of a value, not whether
305 it is defined (groditi)
307 * Class::MOP::Method::Accessor
308 - made this a subclass of Class::MOP::Method::Generated
309 - removed the relevant attributes
311 * Class::MOP::Method::Constructor
312 - fixed the cached values we had to be more sane
313 - made this a subclass of Class::MOP::Method::Generated
314 - fixed generated constructor so it properly handles
316 - added tests for this
317 - added the option to allow for both inlined and
318 non-inlined constructors.
319 - Update inlined methods for builder and predicate changes (groditi)
321 * Class::MOP::Method::Generated
322 - added this class as an abstract base for the
323 Class::MOP::Method::{Constructor,Accessor} classes
324 - added tests for this
327 - Alter tests (005, 014 020, 021) for new builder addition (groditi)
328 - Tests for new predicate behavior (and corrections to old tests) (groditi)
331 - Update ArrayRef based class example to work with predicate changes
333 0.42 Mon. July 16, 2007
334 !!! Horray for mst, he fixed it !!!
336 * Class::MOP::Package
337 - alter symbol table handling to deal with 5.8.x and 5.9.x
340 - Get rid of the crappy workaround from 0.40/41
342 0.41 Sun. July 15, 2007
344 Arghh!!! My TODO test didn't work, so I handle
345 it manually now so that people can use this
346 with 5.9.5/bleadperl without issue.
348 0.40 Tues, July 3, 2007
350 ~ marked a test in 003_methods.t as TODO
351 for perl 5.9.5 (this test is irrelvant to
352 the module functioning on 5.9.5 for the most
355 0.39 Mon. June 18, 2007
356 * Class::MOP::Immutable
357 - added make_metaclass_mutable + docs (groditi)
358 - removed unused variable
359 - added create_immutable_transformer
360 necessary for sane overloading of immutable behavior
361 - tests for this (groditi)
364 - Immutability can now be undone,
365 added make_mutable + tests + docs (groditi)
366 - Massive changes to the way Immutable is done
367 for details see comments next to make_immutable
368 This fixes a bug where custom metaclasses broke
369 when made immutable. We are now keeping one immutable
370 metaclass instance per metaclass instead of just one
371 to prevent isa hierarchy corruption. Memory use will go
372 up, but I suspect it will be neglible.
373 - New tests added for this behavior. (groditi)
375 0.38 Thurs. May 31, 2007
376 ~~ More documentation updates ~~
378 * Class::MOP::Package
379 - we now deal with stub methods properly
380 - added tests for this
381 - fixed some tests failing on 5.9.5 (thanks blblack)
383 * Class::MOP::Attribute
384 - added get_read_method and get_write_method
385 thanks to groditi for this code, tests
387 - added tests and POD for this
390 - fixed RT issue #27329, clone object now
391 handles undef values correctly.
392 - added tests for this
393 - Corrected anon-class handling so that they
394 will not get reaped when instances still
395 exist which need to reference them. This is
396 the correct behavior, hopefully this is an
397 obscure enough feature that there are not too
398 many work arounds out in the wild.
399 - added tests for this by groditi
400 - updated docs to explain this
403 - load custom metaclasses automatically (thanks groditi)
404 - added tests for this behavior
406 0.37 Sat. March 10, 2007
407 ~~ Many, many documentation updates ~~
410 - added &load_class and &is_class_loaded
411 - added tests and docs for these
413 * Class::MOP::Attribute
414 - default now checks the instance with defined to
415 avoid setting off bool-overloads (found by Carl Franks)
419 - bad name in a test, causing meaningless failuress.
425 - All attribute names are now consistent and follow Perl 6
426 style (prefixed with the sigil, and ! as the twigil for
427 private attrs). This should not affect any code, unless
428 you broke encapsulation, in which case, it is your problem
431 !! Class::MOP::Class::Immutable has been removed
433 * Class::MOP::Method::Constructor
434 - this has been moved out of Class::MOP::Class::Immutable
435 and is a proper subclass of Class::MOP::Method now.
438 - this module now uses Class::MOP::Immutable for the
439 immutable transformation instead of
440 Class::MOP::Class::Immutable.
442 + Class::MOP::Immutable
443 - this module now controls the transformation from a mutable
444 to an immutable version of the class. Docs for this will
445 be coming eventually.
448 0.36 Sun. Nov. 5, 2006
450 - added a few 'no warnings' lines to keep annoying
451 (and meaningless) warnings from chirping during
455 - some more bootstrapping is now done on the new
458 * Class::MOP::Class::Immutable
460 - constructor generation is now handled by
461 the Class::MOP::Method::Constructor class
463 * Class::MOP::Method::Constructor
464 - created this to handle constructor generation
465 in Class::MOP::Class::Immutable
467 * Class::MOP::Attribute
469 - attributes now delegate to the
470 Class::MOP::Method::Accessor to generate
473 * Class::MOP::Method::Accessor
474 - all accessor generation functions from
475 Class::MOP::Attribute have been moved here
477 0.35 Sat. Sept. 30, 2006
479 * scripts/class_browser.pl
480 - initial prototype of a class browser, more
481 on this to come. Comments and patches are
485 - All Class::MOP::* accessors are no longer
486 re-generated in the bootstrap, instead
487 they are aliased from the originals
488 - fixed tests to reflect
489 - added Class::MOP::Method (and its subclasses)
491 - adjusted tests for this
492 - added the Class::MOP::Instance attributes
497 - methods are no longer blessed CODE refs
498 but are actual objects which can be CODE-ified
499 - adjusted tests to compensate
500 - adjusted docs for this
503 - changed how methods are dealt with to
504 encapsulate most of the work into the
505 &get_method_map method
506 - made several adjustments for the change
507 in Class::MOP::Method
508 - &add_attribute now checks if you are adding
509 a duplicate name, and properly removes the
510 old one before installing the new one
511 - added tests for this
512 - adjusted docs for this
514 * Class::MOP::Class::Immutable
515 - added caching of &get_method_map
516 - fixed issue with &get_package_symbol
517 - cleaned up the methods that die (patch by David Wheeler)
519 * Class::MOP::Package
520 - added filtering capabilities to
521 &list_all_package_symbols
523 0.34 Sat. Aug. 26, 2006
525 - added the %:methods attribute, which like
526 the $:version and such just actually goes
527 to the symbol table to get it's stuff.
528 However, it makes the MOP more complete.
530 - The &create method now requires that all
531 but the package name now is passed in as
532 named parameters. See docs for more info.
533 - updated docs and tests for this
536 - added &dump method to easily Data::Dumper
540 - cleaned up the initialization of attributes
541 which do not store things in the instance
542 - added the %:methods attribute definition to
545 ~ lots of misc. test cleanup
547 0.33 Sat. Aug. 19, 2006
549 - moved the metaclass cache out of here
550 and it is now in Class::MOP itself.
553 - moved all the metaclass cache stuff here
554 - fixed all tests for this
556 * Class::MOP::Attribute
557 - reference values (other than CODE refs)
558 are no longer allowed for defaults
559 - added tests for this
561 * Class::MOP::Package
562 - fixed an issue with perl 5.8.1 and how it deals
563 with symbol tables. The namespace hash is now
564 always reloaded from the symbol table.
566 ~ lots of misc. documentation cleanup
568 0.32 Sat. Aug. 12, 2006
569 + added Class::MOP::Object so that the
570 metamodel is more complete (and closer
571 to what Perl 6 will probably be).
573 * Class::MOP::Package
574 - refactored entire class, this is now
575 the primary gateway between the metaclass
576 and the Perl 5 symbol table
577 - added many tests for this
578 - this class is now a subclass of
580 - added some tests to reflect this
583 - refactored all symbol table access to
584 use Class::MOP::Package methods instead
587 - adding the $:version attribute in the bootstrap
588 so that Module has a version as an attribute
589 - see comment in Class::MOP for details
590 - added the $:authority attribute to this module
591 as well as an &identifier method, to bring us
592 ever closer to Perl 6 goodness
593 - I have added $AUTHORITY to all the modules
594 - added tests for this
596 * Class::MOP::Instance
597 - added &deinitialize_slot for removing slots
599 - added tests for this
601 * Class::MOP::Attribute
602 - added support for &deinitialize_slot for removing
603 slots from an instance
604 - added tests for this
606 0.31 Sat. July 15, 2006
609 - added &find_method_by_name to locate a method
610 anywhere within the class hierarchy
612 * Class::MOP::Attribute
613 - added &set_value and &get_value for getting
614 the value of the attribute for a particular
617 0.30 Wed. July 5, 2006
618 ---------------------------------------
619 This is the first version of Class::MOP
620 to introduce the immutable features which
621 will be used for optimizating the MOP.
622 This support should still be considered
623 experimental, but moving towards stability.
624 ---------------------------------------
626 * Created Class::MOP::Class::Immutable
628 * Created the Class::MOP::Package and
629 Class::MOP::Module classes to more
630 closely conform to Perl 6's meta-model
633 - now inherits from Class::MOP::Module
634 - several methods moved to ::Module and
635 ::Package and now inherited
636 - added tests for this
638 * Class::MOP::Instance
639 - added an is_inlinable method to allow other
640 classes to check before they attempt to optimize.
641 - added an inline_create_instance to inline
642 instance creation (of course)
645 - the Class::MOP::Class::*_package_variable
646 methods are all now methods of Class::MOP::Package
647 and called *_package_symbol instead. This is
648 because they are now more general purpose symbol
649 table manipulation methods.
651 0.29_02 Thurs. June 22, 2006
652 ++ DEVELOPER RELEASE ++
654 - small change in &create so that it behaves
655 properly when inherited
656 - small fix to &clone_instance
658 0.29_01 Fri. May 12, 2006
659 ++ DEVELOPER RELEASE ++
660 - This release works in combination with
661 Moose 0.09_01, it is a developer release
662 because it introduces a new instance
663 sub-protocol and has not yet been
667 - anon-classes are now properly garbage collected
668 - added tests for this
669 - improved method modifier wrapping
671 * Class::MOP::Instance
672 - added new instance protocol
673 - added tests for this
674 - changed all relevant modules and examples
676 - Class::MOP::Attribute
680 - you no longer need to specify the metaclass
681 itself, if it is not there, Class::MOP::Class
683 - updated tests for this
686 - added ArrayBasedStorage example to show
687 instance storage using ARRAY refs instead of
689 - added tests for this
690 - InsideOutClass is totally revised using the
691 new instance protocol
692 - added more tests for this
694 0.26 Mon. April 24, 2006
696 - added find_attribute_by_name method
697 - added tests and docs for this
698 - some small optimizations
700 * Class::MOP::Attribute
701 - some small optimizations
703 0.25 Thurs. April 20, 2006
705 - added create_anon_class for creating anonymous classes
706 - added tests for this
707 - added get_all_metaclasses, get_all_metaclass_names
708 and get_all_metaclass_instances method to allow
709 access to all the cached metaclass objects.
710 - attribute slot initialization is now the responsibility
711 of the attribute itself, and construct_instance now
712 delegates appropriately
714 * Class::MOP::Attribute
715 - attribute slot initialization is now the responsibility
716 of the attribute itself, so we added a method for it
717 called initialize_instance_slot
720 - adjusted all the examples to use the new attribute
721 initialize_instance_slot method
723 0.24 Tues. April 11, 2006
725 - cleaned up how the before/after/around method
726 modifiers get named with Sub::Name
728 0.23 Thurs. March 30, 2006
730 - fixed the way attribute defaults are handled
731 during instance construction (bug found by chansen)
733 * Class::MOP::Attribute
734 - read-only accessors ('reader') will now die if
735 passed more than one argument (attempting to write
737 - added tests for this
738 - adjusted all /example files to comply
740 0.22 Mon. March 20, 2006
742 - localized $@ in the *_package_variable functions
743 because otherwise, it does ugly things in Moose.
744 - added test case for this
746 0.21 Wed. March 15, 2006
748 - fixed issue where metaclasses are reaped from
749 our cache in global destruction, and so are not
750 available in DESTORY calls
752 0.20 Thurs. March 2, 2006
753 - removed the dependency for Clone since
754 we no longer to deep-cloning by default.
757 - added &package_name, &name and
758 &fully_qualified_name methods, some of
759 which were formerly private subs in
762 * Class::MOP::Method::Wrapped
763 - allows for a method to be wrapped with
764 before, after and around modifiers
765 - added tests and docs for this feature
768 - improved &get_package_symbol
769 - &version and &superclasses now use it
770 - methods are now blessed into Class::MOP::Method
772 - added methods to install CLOS-style method modifiers
773 - &add_before_method_modifier
774 - &add_after_method_modifier
775 - &add_around_method_modifier
776 - added tests and docs for these
777 - added &find_next_method_by_name which finds the
778 equivalent of SUPER::method_name
780 0.12 Thurs. Feb 23, 2006
781 - reduced the dependency on B, no need to always
785 - added docs to the C3 method dispatch order test
786 - fixed missing Algorithm::C3 dependency by making
787 the test skip if it is not installed
789 0.11 Mon Feb. 20, 2006
791 - added example of changing method dispatch order to C3
794 - changed how clone_instance behaves, it now only does a
795 shallow clone (see docs for more details)
796 - added docs and tests
798 0.10 Tues Feb. 14, 2006
799 ** This release was mostly about writing more tests and
800 cleaning out old and dusty code, the MOP should now
801 be considered "ready to use".
803 - adding more tests to get coverage up a little higher,
804 mostly testing errors and edge cases.
805 - test coverage is now at 99%
808 - no longer optionally exports to UNIVERSAL::meta or
809 creates a custom metaclass generator, use the
810 metaclass pragma instead.
813 - fixed a number of minor issues which came up in the
814 error/edge-case tests
816 * Class::MOP::Attribute
817 - fixed a number of minor issues which came up in the
818 error/edge-case tests
821 - fixing the AttributesWithHistory example, it was broken.
823 0.06 Thurs Feb. 9, 2006
825 - adding new metaclass pragma to make setting up the
826 metaclass a little more straightforward
829 - clean up bootstrapping to include more complete
830 attribute definitions for Class::MOP::Class and
831 Class::MOP::Attribute (accessors, readers, writers,
832 etc.) ... it is redundant, but is useful meta-info
836 - fixing minor meta-circularity issue with &meta, it
837 is now more useful for subclasses
838 - added &get_attribute_map as an accessor for the
839 hash of attribute meta objects
840 - &compute_all_applicable_attributes now just returns
841 the attribute meta-object, rather than the HASH ref
842 since all the same info can be gotten from the
843 attribute meta-object itself
844 - updated docs & tests to reflect
845 - added &clone_instance method which does a deep clone
846 of the instance structure created by &construct_instance
847 - added docs & tests for this
848 - added Clone as a dependency
849 - added &new_object and &clone_object convience methods to
850 return blessed new or cloned instances
851 - they handle Class::MOP::Class singletons correctly too
852 - added docs & tests for this
853 - cleaned up the &constuct_class_instance so that it behaves
854 more like &construct_instance (and managed the singletons too)
855 - added the &check_metaclass_compatibility method to make sure
856 that metaclasses are upward and downward compatible.
857 - added tests and docs for this
860 - adjusting code to use the &Class::MOP::Class::meta
862 - adjusting code to use the metaclass pragma
864 0.05 Sat Feb. 4, 2006
866 - added the &attribute_metaclass and &method_metaclass
867 attributes which contain a metaclass name to use for
868 attributes/methods respectively
871 - bootstrap additional attributes for Class::MOP::Class
874 - adjusted the example code and tests to use the new
875 &attribute_metaclass feature of Class::MOP::Class
879 0.04 Fri Feb. 3, 2006
881 - some documentation suggestions from #perl6
883 * Class::MOP::Attribute
884 - improved error messages
887 - added new examples:
888 - AttributesWithHistory
889 - ClassEncapsultedAttributes
891 0.03 Fri Feb. 3, 2006
892 - converted to Module::Build instead of EU::MM
894 * Class::MOP::Attribute
895 - refactored method generation code
896 - attributes are now associated with class directly
899 - refactored the InsideOut example to take advantage
900 of the Class::MOP::Attribute refactoring
901 - changed example files to .pod files and hide thier
902 package names from PAUSE (I don't want to own these
903 namespaces really, they are just examples)
905 0.02 Thurs Feb. 2, 2006
906 - moving examples from t/lib/* to examples/*
907 - adding POD documentation to the examples
909 0.01 Thurs Feb. 2, 2006