1 Revision history for Perl extension Class-MOP.
4 !! Several fixes resulting in yet another 25-30% speedup !!
7 - now stores the instance of the instance
8 metaclass to avoid needless recomputation
9 and deletes it when the cache is blown
10 - introduce methods to query Class::MOP::Class for
11 the options used to make it immutable as well as
12 the proper immutable transformer. (groditi)
15 - {add, has, get, remove}_package_symbol all
16 now accept a HASH ref argument as well as the
17 string. All internal usages now use the HASH
21 - MOP.xs does sanity checks on the coderef
23 - is_class_loaded check now uses code that
24 was improved in Moose's ClassName type
26 - nonsensical (undef, empty, reference) class
27 names now throw a more direct error in
29 - tests for this and other aspects of
35 Class::MOP::Method::Wrapped
37 - switched usage of reftype to ref because
40 0.58 Thurs. May 29, 2008
41 (late night release engineering)--
43 - fixing the version is META.yml, no functional
44 changes in this release
46 0.57 Wed. May 28, 2008
47 !! Several speedups resulting in 20-25% speedups !!
48 || (thanks to konobi, groditi, mst & CataMoose) !!
51 - made get_method_map use list_all_package_symbols
52 instead of manually grabbing each symbol
53 - streamlining &initialize somewhat, since it gets
57 - made {get, has}_package_symbol not call
59 - inlining a few calls to &name with
60 direct HASH access key access
61 - added get_all_package_symbols to fetch
62 a HASH of items based on a type filter
63 similar to list_all_package_symbols
64 - added tests for this
67 Class::MOP::Method::Constructor
68 Class::MOP::Method::Generated
69 Class::MOP::Method::Accessor
70 - added more descriptive error message to help
71 keep people from wasting time tracking an error
72 that is easily fixed by upgrading.
74 * Class::MOP::Immutable
75 - Don't inline a destructor unless the user actually
77 - added tests for this
79 0.56 Saturday, May 24, 2008
81 - we now get the &check_package_cache_flag
82 function from MRO::Compat
83 - All XS based functionality now has a
85 - the CLASS_MOP_NO_XS environment variable
86 can now be used to force non-XS versions
89 * Class::MOP::Attribute
90 - add has_read_method and has_write_method
91 - get_{read,write}_method_ref now wraps the
92 anon-sub ref in the method metaclass when
94 - added tests for this
96 * Class::MOP::Immutable
97 - added the ability to "wrap" methods when
98 making the class immutable
101 - now handling the edge case of ->meta->identifier
102 dying by wrapping add_package_symbol to specifically
103 allow for it to work.
104 - added tests for this
106 * Class::MOP::Attribute
108 Class::MOP::Immutable
109 - any time a method meta object is constructed
110 we make sure to pass the correct package and
111 method name information
114 Class::MOP::Method::Wrapped
115 Class::MOP::Method::Generated
116 Class::MOP::Method::Accessor
117 Class::MOP::Method::Consructor
118 - the &wrap constructor method now requires that a
119 'package_name' and 'name' attribute are passed. This
120 is to help support the no-XS version, and will
121 throw an error if these are not supplied.
122 - all these classes are now bootstrapped properly
123 and now store the package_name and name attributes
126 ~ Build.PL has been removed since the
127 Module::Install support has been removed
129 0.55 Mon. April 28, 2008
130 - All classes now have proper C3 MRO support
131 - added MRO::Compat as a dependency to allow
132 for the C3 MRO support to Just Work in all
136 - rebless_instance now returns the instance
137 it has just blessed, this is mostly to
139 - set the attr correctly in rebless_instance
140 when it has no init_arg
141 - tweaked &linear_isa and &class_precedence_list
142 to support c3 classes.
144 0.54 Fri. March, 14, 2008
147 - making sure that load_class never gets
148 passed a value from @_ or $_ to squash
149 Ovid's bug (http://use.perl.org/~Ovid/journal/35763)
152 - make_{immutable,mutable} now return 1
154 - improved error handling in ->create method
155 - rebless_instance now takes extra params which
156 will be used to populate values
157 - added tests for this
160 - localizing the Data::Dumper configurations so
161 that it does not pollute others (RT #33509)
167 Class::MOP::Attribute
168 - these classes no longer define their own ->meta,
169 but instead just inherit from Class::MOP::Object
171 * Class::MOP::Instance
172 Class::MOP::Immutable
173 - these classes now inherit from Class::MOP::Object
176 - fixed the filename length on several
177 test files so we install on VMS better
179 - fixed incorrect use of catdir when it
180 should be catfile (RT #32385)
182 0.53 Thurs. Feb. 14, 1008
183 ~~ several doc. fixes and updates ~~
186 Class::MOP::Method::Constructor
187 Class::MOP::Attribute
188 - making init_arg accept an undefined value
189 to indicate that no constructor args can
190 be passed (thanks to nothingmuch)
191 - added tests for this
192 - added attribute initializer attribute (rjbs)
195 - making this use the new init_arg => undef
196 feature instead of the silly hack from
197 before (thanks to nothingmuch)
199 0.52 Tues. Jan. 22, 2008
201 - fixed bug in rebless_instance
204 * Class::MOP::Method::Constructor
205 - removed assumptions about the existence of
208 0.51 Mon. Jan. 14, 2008
209 ~~~ some misc. doc. fixes ~~~
210 ~~ updated copyright dates ~~
213 - now sets the IS_RUNNING_ON_5_10
214 constant so that we can take advantage
215 of some of the nice bits of 5.10
218 - uses the IS_RUNNING_ON_5_10 flag to
219 optimize the &linearized_isa method
220 and avoid the hack/check for circular
221 inheritence in &class_precedence_list
222 - added rebless_instance method (Sartak)
223 - added tests for this
225 * Class::MOP::Immutable
226 - the immutable class now keeps track of
227 the transformer which immutablized it
229 * Class::MOP::Instance
230 - added rebless_instance_structure method (Sartak)
231 - added tests for this
233 0.50 Fri. Dec. 21, 2007
235 - fixed bug in immutable to make sure that
236 transformation arguments are saved
238 - added tests for this
240 * Class::MOP::Immutable
241 - fixed a bug (see above)
243 * Class::MOP::Attribute
246 0.49 Fri. Dec. 14, 2007
247 !! Class::MOP now loads 2 x faster !!
248 !! with XS speedups (thanks konobi) !!
251 - removed the dependency on B
252 - added two XS functions (thanks konobi)
253 - get_code_info($code) which replaces all
254 the B fiddling we were doing with
255 faster/leaner XS level fiddling
256 - check_package_cache_flag($pkg_name) which
257 returns the PL_sub_generation variable to
258 be used to help manage method caching.
261 In 5.10 or greater this will actually
262 use the mro::get_pkg_gen instead to give
263 even more accurate caching information.
264 blblack++ for that stuff :)
267 - added the &subclasses method (thanks rlb)
268 - added the update_package_cache_flag and
269 reset_package_cache_flag which help keep
270 track of when we need to re-fetch the
272 - Several small improvements to take advantage
273 of the new method map caching features
275 0.48 Mon. Nov. 26, 2007
276 * Class::MOP::Attribute
277 - fixed get_read/write_method to handle the
278 HASH ref case, which makes the
279 get_read/write_method_ref handle it too.
280 - added more tests for this
282 0.47 Sat. Nov. 24, 2007
283 * Class::MOP::Attribute
284 - fixed misspelling in get_write_method_ref
285 - added more tests for this
287 0.46 Fri. Nov. 23, 2007
289 - added the linearized_isa method instead of constantly
290 pruning duplicate classes (this will be even more
291 useful in the 5.10-compat version coming soon)
293 * Class::MOP::Attribute
294 - added the get_read_method_ref and get_write_method_ref
295 methods which allow you to retrieve a CODE ref which
296 can always be used to read or write an attribute.
298 0.45 Thurs. Nov. 13, 2007
299 * Class::MOP::Attribute
300 - Fix error message on confess (groditi)
302 0.44 Thurs. Nov. 13, 2007
303 - Apparently I didn't make dist correctly (groditi)
305 0.43 Thurs. Nov. 13, 2007
307 - Add support for the 'builder' attribute (groditi)
310 - optimise metaclass-already-exists check in
311 construct_class_instance (groditi)
312 - duplicate check into initialize to save a
313 call through (groditi)
315 * Class::MOP::Attribute
316 - Add support for the 'builder' attribute (groditi)
317 - Make predicates check for the existence of a value, not whether
318 it is defined (groditi)
320 * Class::MOP::Instance
321 - Make predicates check for the existence of a value, not whether
322 it is defined (groditi)
324 * Class::MOP::Method::Accessor
325 - made this a subclass of Class::MOP::Method::Generated
326 - removed the relevant attributes
328 * Class::MOP::Method::Constructor
329 - fixed the cached values we had to be more sane
330 - made this a subclass of Class::MOP::Method::Generated
331 - fixed generated constructor so it properly handles
333 - added tests for this
334 - added the option to allow for both inlined and
335 non-inlined constructors.
336 - Update inlined methods for builder and predicate changes (groditi)
338 * Class::MOP::Method::Generated
339 - added this class as an abstract base for the
340 Class::MOP::Method::{Constructor,Accessor} classes
341 - added tests for this
344 - Alter tests (005, 014 020, 021) for new builder addition (groditi)
345 - Tests for new predicate behavior (and corrections to old tests) (groditi)
348 - Update ArrayRef based class example to work with predicate changes
350 0.42 Mon. July 16, 2007
351 !!! Horray for mst, he fixed it !!!
353 * Class::MOP::Package
354 - alter symbol table handling to deal with 5.8.x and 5.9.x
357 - Get rid of the crappy workaround from 0.40/41
359 0.41 Sun. July 15, 2007
361 Arghh!!! My TODO test didn't work, so I handle
362 it manually now so that people can use this
363 with 5.9.5/bleadperl without issue.
365 0.40 Tues, July 3, 2007
367 ~ marked a test in 003_methods.t as TODO
368 for perl 5.9.5 (this test is irrelvant to
369 the module functioning on 5.9.5 for the most
372 0.39 Mon. June 18, 2007
373 * Class::MOP::Immutable
374 - added make_metaclass_mutable + docs (groditi)
375 - removed unused variable
376 - added create_immutable_transformer
377 necessary for sane overloading of immutable behavior
378 - tests for this (groditi)
381 - Immutability can now be undone,
382 added make_mutable + tests + docs (groditi)
383 - Massive changes to the way Immutable is done
384 for details see comments next to make_immutable
385 This fixes a bug where custom metaclasses broke
386 when made immutable. We are now keeping one immutable
387 metaclass instance per metaclass instead of just one
388 to prevent isa hierarchy corruption. Memory use will go
389 up, but I suspect it will be neglible.
390 - New tests added for this behavior. (groditi)
392 0.38 Thurs. May 31, 2007
393 ~~ More documentation updates ~~
395 * Class::MOP::Package
396 - we now deal with stub methods properly
397 - added tests for this
398 - fixed some tests failing on 5.9.5 (thanks blblack)
400 * Class::MOP::Attribute
401 - added get_read_method and get_write_method
402 thanks to groditi for this code, tests
404 - added tests and POD for this
407 - fixed RT issue #27329, clone object now
408 handles undef values correctly.
409 - added tests for this
410 - Corrected anon-class handling so that they
411 will not get reaped when instances still
412 exist which need to reference them. This is
413 the correct behavior, hopefully this is an
414 obscure enough feature that there are not too
415 many work arounds out in the wild.
416 - added tests for this by groditi
417 - updated docs to explain this
420 - load custom metaclasses automatically (thanks groditi)
421 - added tests for this behavior
423 0.37 Sat. March 10, 2007
424 ~~ Many, many documentation updates ~~
427 - added &load_class and &is_class_loaded
428 - added tests and docs for these
430 * Class::MOP::Attribute
431 - default now checks the instance with defined to
432 avoid setting off bool-overloads (found by Carl Franks)
436 - bad name in a test, causing meaningless failuress.
442 - All attribute names are now consistent and follow Perl 6
443 style (prefixed with the sigil, and ! as the twigil for
444 private attrs). This should not affect any code, unless
445 you broke encapsulation, in which case, it is your problem
448 !! Class::MOP::Class::Immutable has been removed
450 * Class::MOP::Method::Constructor
451 - this has been moved out of Class::MOP::Class::Immutable
452 and is a proper subclass of Class::MOP::Method now.
455 - this module now uses Class::MOP::Immutable for the
456 immutable transformation instead of
457 Class::MOP::Class::Immutable.
459 + Class::MOP::Immutable
460 - this module now controls the transformation from a mutable
461 to an immutable version of the class. Docs for this will
462 be coming eventually.
465 0.36 Sun. Nov. 5, 2006
467 - added a few 'no warnings' lines to keep annoying
468 (and meaningless) warnings from chirping during
472 - some more bootstrapping is now done on the new
475 * Class::MOP::Class::Immutable
477 - constructor generation is now handled by
478 the Class::MOP::Method::Constructor class
480 * Class::MOP::Method::Constructor
481 - created this to handle constructor generation
482 in Class::MOP::Class::Immutable
484 * Class::MOP::Attribute
486 - attributes now delegate to the
487 Class::MOP::Method::Accessor to generate
490 * Class::MOP::Method::Accessor
491 - all accessor generation functions from
492 Class::MOP::Attribute have been moved here
494 0.35 Sat. Sept. 30, 2006
496 * scripts/class_browser.pl
497 - initial prototype of a class browser, more
498 on this to come. Comments and patches are
502 - All Class::MOP::* accessors are no longer
503 re-generated in the bootstrap, instead
504 they are aliased from the originals
505 - fixed tests to reflect
506 - added Class::MOP::Method (and its subclasses)
508 - adjusted tests for this
509 - added the Class::MOP::Instance attributes
514 - methods are no longer blessed CODE refs
515 but are actual objects which can be CODE-ified
516 - adjusted tests to compensate
517 - adjusted docs for this
520 - changed how methods are dealt with to
521 encapsulate most of the work into the
522 &get_method_map method
523 - made several adjustments for the change
524 in Class::MOP::Method
525 - &add_attribute now checks if you are adding
526 a duplicate name, and properly removes the
527 old one before installing the new one
528 - added tests for this
529 - adjusted docs for this
531 * Class::MOP::Class::Immutable
532 - added caching of &get_method_map
533 - fixed issue with &get_package_symbol
534 - cleaned up the methods that die (patch by David Wheeler)
536 * Class::MOP::Package
537 - added filtering capabilities to
538 &list_all_package_symbols
540 0.34 Sat. Aug. 26, 2006
542 - added the %:methods attribute, which like
543 the $:version and such just actually goes
544 to the symbol table to get it's stuff.
545 However, it makes the MOP more complete.
547 - The &create method now requires that all
548 but the package name now is passed in as
549 named parameters. See docs for more info.
550 - updated docs and tests for this
553 - added &dump method to easily Data::Dumper
557 - cleaned up the initialization of attributes
558 which do not store things in the instance
559 - added the %:methods attribute definition to
562 ~ lots of misc. test cleanup
564 0.33 Sat. Aug. 19, 2006
566 - moved the metaclass cache out of here
567 and it is now in Class::MOP itself.
570 - moved all the metaclass cache stuff here
571 - fixed all tests for this
573 * Class::MOP::Attribute
574 - reference values (other than CODE refs)
575 are no longer allowed for defaults
576 - added tests for this
578 * Class::MOP::Package
579 - fixed an issue with perl 5.8.1 and how it deals
580 with symbol tables. The namespace hash is now
581 always reloaded from the symbol table.
583 ~ lots of misc. documentation cleanup
585 0.32 Sat. Aug. 12, 2006
586 + added Class::MOP::Object so that the
587 metamodel is more complete (and closer
588 to what Perl 6 will probably be).
590 * Class::MOP::Package
591 - refactored entire class, this is now
592 the primary gateway between the metaclass
593 and the Perl 5 symbol table
594 - added many tests for this
595 - this class is now a subclass of
597 - added some tests to reflect this
600 - refactored all symbol table access to
601 use Class::MOP::Package methods instead
604 - adding the $:version attribute in the bootstrap
605 so that Module has a version as an attribute
606 - see comment in Class::MOP for details
607 - added the $:authority attribute to this module
608 as well as an &identifier method, to bring us
609 ever closer to Perl 6 goodness
610 - I have added $AUTHORITY to all the modules
611 - added tests for this
613 * Class::MOP::Instance
614 - added &deinitialize_slot for removing slots
616 - added tests for this
618 * Class::MOP::Attribute
619 - added support for &deinitialize_slot for removing
620 slots from an instance
621 - added tests for this
623 0.31 Sat. July 15, 2006
626 - added &find_method_by_name to locate a method
627 anywhere within the class hierarchy
629 * Class::MOP::Attribute
630 - added &set_value and &get_value for getting
631 the value of the attribute for a particular
634 0.30 Wed. July 5, 2006
635 ---------------------------------------
636 This is the first version of Class::MOP
637 to introduce the immutable features which
638 will be used for optimizating the MOP.
639 This support should still be considered
640 experimental, but moving towards stability.
641 ---------------------------------------
643 * Created Class::MOP::Class::Immutable
645 * Created the Class::MOP::Package and
646 Class::MOP::Module classes to more
647 closely conform to Perl 6's meta-model
650 - now inherits from Class::MOP::Module
651 - several methods moved to ::Module and
652 ::Package and now inherited
653 - added tests for this
655 * Class::MOP::Instance
656 - added an is_inlinable method to allow other
657 classes to check before they attempt to optimize.
658 - added an inline_create_instance to inline
659 instance creation (of course)
662 - the Class::MOP::Class::*_package_variable
663 methods are all now methods of Class::MOP::Package
664 and called *_package_symbol instead. This is
665 because they are now more general purpose symbol
666 table manipulation methods.
668 0.29_02 Thurs. June 22, 2006
669 ++ DEVELOPER RELEASE ++
671 - small change in &create so that it behaves
672 properly when inherited
673 - small fix to &clone_instance
675 0.29_01 Fri. May 12, 2006
676 ++ DEVELOPER RELEASE ++
677 - This release works in combination with
678 Moose 0.09_01, it is a developer release
679 because it introduces a new instance
680 sub-protocol and has not yet been
684 - anon-classes are now properly garbage collected
685 - added tests for this
686 - improved method modifier wrapping
688 * Class::MOP::Instance
689 - added new instance protocol
690 - added tests for this
691 - changed all relevant modules and examples
693 - Class::MOP::Attribute
697 - you no longer need to specify the metaclass
698 itself, if it is not there, Class::MOP::Class
700 - updated tests for this
703 - added ArrayBasedStorage example to show
704 instance storage using ARRAY refs instead of
706 - added tests for this
707 - InsideOutClass is totally revised using the
708 new instance protocol
709 - added more tests for this
711 0.26 Mon. April 24, 2006
713 - added find_attribute_by_name method
714 - added tests and docs for this
715 - some small optimizations
717 * Class::MOP::Attribute
718 - some small optimizations
720 0.25 Thurs. April 20, 2006
722 - added create_anon_class for creating anonymous classes
723 - added tests for this
724 - added get_all_metaclasses, get_all_metaclass_names
725 and get_all_metaclass_instances method to allow
726 access to all the cached metaclass objects.
727 - attribute slot initialization is now the responsibility
728 of the attribute itself, and construct_instance now
729 delegates appropriately
731 * Class::MOP::Attribute
732 - attribute slot initialization is now the responsibility
733 of the attribute itself, so we added a method for it
734 called initialize_instance_slot
737 - adjusted all the examples to use the new attribute
738 initialize_instance_slot method
740 0.24 Tues. April 11, 2006
742 - cleaned up how the before/after/around method
743 modifiers get named with Sub::Name
745 0.23 Thurs. March 30, 2006
747 - fixed the way attribute defaults are handled
748 during instance construction (bug found by chansen)
750 * Class::MOP::Attribute
751 - read-only accessors ('reader') will now die if
752 passed more than one argument (attempting to write
754 - added tests for this
755 - adjusted all /example files to comply
757 0.22 Mon. March 20, 2006
759 - localized $@ in the *_package_variable functions
760 because otherwise, it does ugly things in Moose.
761 - added test case for this
763 0.21 Wed. March 15, 2006
765 - fixed issue where metaclasses are reaped from
766 our cache in global destruction, and so are not
767 available in DESTORY calls
769 0.20 Thurs. March 2, 2006
770 - removed the dependency for Clone since
771 we no longer to deep-cloning by default.
774 - added &package_name, &name and
775 &fully_qualified_name methods, some of
776 which were formerly private subs in
779 * Class::MOP::Method::Wrapped
780 - allows for a method to be wrapped with
781 before, after and around modifiers
782 - added tests and docs for this feature
785 - improved &get_package_symbol
786 - &version and &superclasses now use it
787 - methods are now blessed into Class::MOP::Method
789 - added methods to install CLOS-style method modifiers
790 - &add_before_method_modifier
791 - &add_after_method_modifier
792 - &add_around_method_modifier
793 - added tests and docs for these
794 - added &find_next_method_by_name which finds the
795 equivalent of SUPER::method_name
797 0.12 Thurs. Feb 23, 2006
798 - reduced the dependency on B, no need to always
802 - added docs to the C3 method dispatch order test
803 - fixed missing Algorithm::C3 dependency by making
804 the test skip if it is not installed
806 0.11 Mon Feb. 20, 2006
808 - added example of changing method dispatch order to C3
811 - changed how clone_instance behaves, it now only does a
812 shallow clone (see docs for more details)
813 - added docs and tests
815 0.10 Tues Feb. 14, 2006
816 ** This release was mostly about writing more tests and
817 cleaning out old and dusty code, the MOP should now
818 be considered "ready to use".
820 - adding more tests to get coverage up a little higher,
821 mostly testing errors and edge cases.
822 - test coverage is now at 99%
825 - no longer optionally exports to UNIVERSAL::meta or
826 creates a custom metaclass generator, use the
827 metaclass pragma instead.
830 - fixed a number of minor issues which came up in the
831 error/edge-case tests
833 * Class::MOP::Attribute
834 - fixed a number of minor issues which came up in the
835 error/edge-case tests
838 - fixing the AttributesWithHistory example, it was broken.
840 0.06 Thurs Feb. 9, 2006
842 - adding new metaclass pragma to make setting up the
843 metaclass a little more straightforward
846 - clean up bootstrapping to include more complete
847 attribute definitions for Class::MOP::Class and
848 Class::MOP::Attribute (accessors, readers, writers,
849 etc.) ... it is redundant, but is useful meta-info
853 - fixing minor meta-circularity issue with &meta, it
854 is now more useful for subclasses
855 - added &get_attribute_map as an accessor for the
856 hash of attribute meta objects
857 - &compute_all_applicable_attributes now just returns
858 the attribute meta-object, rather than the HASH ref
859 since all the same info can be gotten from the
860 attribute meta-object itself
861 - updated docs & tests to reflect
862 - added &clone_instance method which does a deep clone
863 of the instance structure created by &construct_instance
864 - added docs & tests for this
865 - added Clone as a dependency
866 - added &new_object and &clone_object convience methods to
867 return blessed new or cloned instances
868 - they handle Class::MOP::Class singletons correctly too
869 - added docs & tests for this
870 - cleaned up the &constuct_class_instance so that it behaves
871 more like &construct_instance (and managed the singletons too)
872 - added the &check_metaclass_compatibility method to make sure
873 that metaclasses are upward and downward compatible.
874 - added tests and docs for this
877 - adjusting code to use the &Class::MOP::Class::meta
879 - adjusting code to use the metaclass pragma
881 0.05 Sat Feb. 4, 2006
883 - added the &attribute_metaclass and &method_metaclass
884 attributes which contain a metaclass name to use for
885 attributes/methods respectively
888 - bootstrap additional attributes for Class::MOP::Class
891 - adjusted the example code and tests to use the new
892 &attribute_metaclass feature of Class::MOP::Class
896 0.04 Fri Feb. 3, 2006
898 - some documentation suggestions from #perl6
900 * Class::MOP::Attribute
901 - improved error messages
904 - added new examples:
905 - AttributesWithHistory
906 - ClassEncapsultedAttributes
908 0.03 Fri Feb. 3, 2006
909 - converted to Module::Build instead of EU::MM
911 * Class::MOP::Attribute
912 - refactored method generation code
913 - attributes are now associated with class directly
916 - refactored the InsideOut example to take advantage
917 of the Class::MOP::Attribute refactoring
918 - changed example files to .pod files and hide thier
919 package names from PAUSE (I don't want to own these
920 namespaces really, they are just examples)
922 0.02 Thurs Feb. 2, 2006
923 - moving examples from t/lib/* to examples/*
924 - adding POD documentation to the examples
926 0.01 Thurs Feb. 2, 2006