Revision history for Object-Pad

0.68    2022-08-13
         * Wording fix in new Object::Pad::MetaFunctions docs
         * Avoid label at end of compound statement (RT144005)

0.67    2022-08-12
         * Added `Object::Pad::MetaFunctions` to contain some introspection
           and reflection helper functions
         * Avoid writing the rather silly-sounding `field $field` in docs;
           use single-letter field names like `$x` or `$f` instead

0.66    2022-07-07
         * Improved performance on perl 5.22 onwards, by merging the operation
           of the individual pp_fieldpad ops into the main pp_methstart op
         * Prepare compatibility with core's `use feature 'class'`:
            + Support `field` keyword as a synonym of `has`, though without
              immediate EXPR version
            + Merge meaning of `ADJUST` and `ADJUSTPARAMS`; give all such
              blocks a params hashref. `ADJUSTPARAMS` is now just a synonym
         * Print "discouraged" warnings on `requires` keyword
         * Print deprecation warnings on `isa` and `does` subkeywords
         * Added list-returning ->get_attribute_values() accessor to
         * Deleted legacy XS symbols relating to "slot" from before it was
           renamed to "field"

0.65    2022-05-10
         * Document the required version for :experimental tags
         * Mention the new Devel::MAT::Tool::Object::Pad in docs

         * Update cv_copy_flags() for SvPADTMP fix; related to RT142468

0.64    2022-04-02
         * Improvements to `:experimental` import tag (RT141801):
            + Support multiple experiments at once
            + Make sure to still enable the default keywords
         * Much better integration with `Devel::MAT::Dumper`:
            + Export complete C-level structures and magic VTBL root
         * Adjusted wording of "MOP API is experimental" so it doesn't refer
           to a package that doesn't actually exist (RT141801)

0.63    2022-03-07
         * Deleted long-deprecated Object::Pad->begin_class
         * No longer declare the entire module as "experimental"
         * Add experimental warnings to still-experimental features; recognise
           `:experimental` import tags to silence them

         * Ensure that generated accessors work correctly regardless of the
           prevailing package when they were generated (RT141599)
         * Ensure that classes and accessors can be generated entirely outside
           of a BEGIN block (RT141677)

0.62    2022-03-01
         * Add "common" methods:
            + Implement `:common` attribute for methods
            + Take 'common' argument to `$metaclass->add_method`
            + Added `$metamethod->is_common` accessor
         * Don't require a terminating semicolon after `has $field { EXPR }`

         * Better handling of role method embeddings that include lexical
           captures (RT141483)

0.61    2022-02-16
         * Added Object::Pad::MOP::Class->create_{class,role}
         * Added $metaclass->seal (RT141294)
         * Added $metaclass->add_required_method and ->required_method_names
         * Accept bodyless `method NAME;` declarations to declare a required
           role method

         * Assert when compclassmeta->name doesn't match PL_curstname (RT141293)

0.60    2022-02-01
         * The Great Slot/Field Rename:
            + "slot" is now called "field"; all perl-visible and XS API has
              been renamed. Various back-compatibility redirections exist for
              most of the parts used by other distributions.
         * Print a deprecation warning on the legacy 'implements' and
           'extends' keywords
         * No longer supports the hooks API from pre-v57
         * Perform unit testing using Data::Dumper instead of Data::Dump to
           reduce non-core test_requires dependencies

0.59    2021-12-15
         * Support lexical methods, stored in lexical variables

         * Check :strict(params) even without any :param slots or ADJUSTPARAM
           blocks (RT140314)
         * Docs updates to improve searchability (RT140141)
         * Don't fiddle with PL_curcop on non-DEBUGGING builds to avoid
           disturbing caller() output (RT139408)

0.58    2021-11-25
         * Trim whitespace within :attribute values (RT140109)

         * Early seal on outer class when deriving an inner subclass of it
         * Store the real slotix in fasthook cache, not its index within the
           direct_slots AV

0.57    2021-11-18
         * Defined new ABI version for class/slot hooks
            + Adds `funcdata` at registration and callback time
            + Adds MOP accessor functions for slotmeta default SV
         * Added :isa() and :does() class attributes; encourage those rather
           than the older keyword style
         * Added more MOP methods:
            + $classmeta->direct_methods, ->get_direct_method
            + $classmeta->all_methods, ->get_method
            + $slotmeta->has_attribute, ->get_attribute_value
         * Added Object::Pad::MOP::SlotAttr, allowing pure-perl slot
           attributes that provide simple metadata storage

0.56    2021-10-22
         * Support roles inheriting from (possibly-multiple) other roles
         * Recognise `accessor` argument to $classmeta->add_slot
         * Add some more MOP methods:
            + $classmeta->direct_roles
            + $classmeta->all_roles
            + $slotmeta->sigil

         * Fix an uninitialised memory warning from valgrind to do with class
         * Quiet the compiler warnings about hv_fetch's key argument maybe
           being NULL

        Development time for this release was sponsored by Perl-Verein Schweiz

0.55    2021-10-11
         * Support :reader and :writer on array and hash slots (RT139647)

         * Complain on attempt to invoke constructor of a class that is not
           yet complete (RT139664)
         * Ensure that psotslots and construct slothooks still run for
           superclasses and applied roles (RT139665)

        Development time for this release was sponsored by Deriv

0.54    2021-10-07
         * Support slot initialiser blocks; don't invoke blocks for values
           passed by :param
         * Support slot default values on non-scalars

        Development time for this release was sponsored by Deriv

0.53    2021-09-29
         * Support null-or-unary reader/writer accessors, called simply

         * Avoid some C99'isms which upset Windows compilers
         * Remember to register pp_weaken() as a custom op
         * Account for the newer OP_ARGCHECK aux structure of perl 5.31.5
         * Set correct XPK_LEXVARNAME() type (related to RT139444)

0.52    2021-08-25
         * Remember to actually enable `use warnings` (RT139027)
         * Permit slotmeta value lookup on roles applied to instances
         * Ensure `ADJUSTPARAMS` on superclass still works on subclasses that
           don't add an `ADJUSTPARAMS` themselves

        Development time for this release was sponsored by Perl-Verein Schweiz

0.51    2021-08-10
         * Added `ADJUSTPARAMS` blocks
         * Allow `apply` hook functions to modify the hookdata value that gets
           stored by the hook
         * Store method name data in accessor generator hooks, so other
           modules can reliably find it
         * Clarify in SYNOPSIS that the example requires perl 5.26 because of
           signatures; also provide another copy that doesn't (RT138578)

         * Don't segfault on colliding :param names (RT138633)
         * Don't ship the authoring test xt/99exported-symbols.t (RT138634)

        Development time for this release was sponsored by Perl-Verein Schweiz

0.50    2021-08-08
         * Provide Object::Pad::ExtensionBuilder to assist 3rd party extension
           module building
         * Generally tidy up the exposed `object_pad.h` file to remove some
           definitions we don't want to make public
         * Add ABI version constants and fields in exposed hook function
           structures for (hopefully) better forward compatibility
         * Add the concept of class hooks, analogous to slot hooks

        Development time for this release was sponsored by Deriv

0.49    2021-08-06
         * Provide $XSAPI_VERSION to allow non-API-breaking changes to be made
           without disturbing compiled 3rd party modules
         * Better searching for in t/99exported-symbols.t
           (thanks (RT138320)
         * Gain a (small) runtime performance boost by remembering to set

         * Ignore some internal linker symbols in t/99exported-symbols.t
         * Remember to bump the version requirement of XS::Parse::Keyword in
           the XS source (RT138318)
         * Make slots visible to string-eval(), PadWalker, perl -d, etc..

        Development time for this release was partly sponsored by
        Perl-Verein Schweiz

0.48    2021-08-02
         * Added features to slothooks:
            + New hooks `.seal_slot` and `.post_construct`
            + `.post_initslot` now runs earlier before `:param`
            + Added a MOP function to query slot attributes
            + Set a minimal pad during construction-time slot hooks
         * Ensure that `:param` logic in constructor invokes setmagic

         * Fixed many classes of UTF-8 bug on class/slot/method names
         * Fixed segfault caused by runtime generation of roles (RT137952)

        Development time for this release was sponsored by Deriv and
        Perl-Verein Schweiz

0.47    2021-07-29
         * Large internal rewrites
            + Split code among several smaller files instead of one giant
            + Rewrite the way that slot attributes work; allow an
              externally-visible plugin-type system of hooks
         * Removed `->param_name` and `->has_param` MOP::Slot accessors

        Development time for this release was sponsored by Perl-Verein Schweiz

0.46    2021-07-21
         * Accept reader, writer, mutator and weak as `->add_slot` parameters
         * Document the `O:P:MOP::Class->begin_class` method
         * Add `O:P:MOP::Class->begin_role`
         * Enable `-DDEBUGGING` if building via debugperl

        Development time for this release was sponsored by Deriv

0.45    2021-07-17
         * Don't give role embedding information a pad name or
           Future::AsyncAwait will break it (RT137649)
         * Make sure that `parammeta->is_weak` is initialised even for params
           applied via roles (RT137751)

0.44    2021-07-15
         * Added `:weak` slot attribute
         * Adjusted some documentation headings for better generation of HTML
           anchors on

        Development time for this release was sponsored by Oetiker+Partner AG

0.43    2021-07-03
         * Initial implementation of `ADJUST` blocks, without params
         * Better docs about ordering of stages of constructor
         * Initial attempt at (temporary) `:struct(params)` class attribute
         * Add O:P:MOP::Class and ::Slot support for slot params

        Development time for this release was sponsored by Oetiker+Partner AG

0.42    2021-07-01
         * Expose `$slotmeta->has_param` API
         * Clarify in docs that `:param` happens before `BUILD`
         * Remove the word "very" from "very experimental" in introduction
           docs paragraph
         * Add `$classmeta->slots`

         * Make sure to embed params from roles correctly (RT136869)
         * Use `XS_INTERNAL()` rather than `static XS()` to (maybe?) keep
           cygwin happy

        Development time for this release was sponsored by Oetiker+Partner AG

0.41    2021-06-21
         * Recognise `:param` on slots, assign automatically from constructor,
           check for required parameters
         * Accept `isa` as a synonym for `extends`, and `does` as a synonym
           for `implements`
         * No longer allow `method BUILD`

         * Complain about a lack of NAME for `class` (related to RT136798)

        Development time for this release was sponsored by Oetiker+Partner AG

0.40    2021-06-02
         * Updated for XS::Parse::Keyword v0.06
         * Silence the -Wunused-variable warning about PL_savetype_name
         * Yield PL_sv_yes from `class` statements so as to keep `require`
           happy (RT136701)

0.39    2021-05-24
         * Update parsing logic to use XS::Parse::Keyword

0.38    2021-05-14
         * Added Object::Pad::MOP::Class->for_class and ->for_caller
         * Provide a generated ->DOES method on each class to account for
           applied roles (RT136462)

         * Make sure that generated accessors are recorded in the metaclass as
           real methods, ensuring role application includes them (RT136507)

0.37    2021-04-01
         * Don't get confused by sub signature parameters of the same name as
           slot variables (RT134456)
         * Don't crash if extends/implements package names are missing or
           malformed (RT134827)
         * Reject requests to make accessors with invalid identifier names

0.36    2021-02-19
         * Added $classmeta->compose_role() (RT134261)
         * Docs updates
            + Point out that slot variables can also be exposed via :reader etc
            + Re├Ârdering for better reading
         * Always add accessor method name to "Too (many/few) arguments"
           messages even on older perls

         * Fix unit tests for change of argcheck message format in perl 5.33.6

0.35    2020-12-28
         * Permit roles to request their methods still be directly invokable,
           to provide back/forward compatibility during code migration

         * More sanity checking around `extends` and `implements` keywords
         * Better complaint about non-invokable methods directly from roles
         * Workaround for string buffer swipe of stack temporaries in

0.34    2020-11-04
         * Reword the "experimental warning" at the top of the docs

         * Use named enum for repr type (thanks ilmari) (RT133354)
         * Use named structs so pahole can see them (thanks ilmari) (RT133355)
         * Make sure to set the CvGV of embedded CVs of methods imported from
         * Fixed a crash case on Perl 5.18 and 5.20 involving the
           PadnameOUTER() flag when fixing up PARENT_PAD_INDEX() (RT132814)

0.33    2020-09-16
         * Roles can now have data slots
         * `use v5.14` in all files

         * pp_sv() needs to EXTEND() before PUSH()
         * Avoid SEGV if ->begin_class is called without PL_parser set
         * Defer sealing of derived classes until their base class is sealed

0.32    2020-08-19
         * Initial attempt at roles, which can compose new methods into
           classes. No support yet for roles with data slots
         * Support compiletime declaration of `requires` methods

0.31    2020-06-30
         * Don't emit a named method for BUILD blocks
            + Enables subclassing of Moo classes
         * Begin documenting the (double-experimental) Object::Pad::MOP API

         * Parser fix for `class NAME VERSION extends ...` without a linefeed
         * Placate some compiler warnings of uninitialised values
         * Find a different way to trigger class sealing which doesn't depend
           on `free` magic of hinthash values, in order to avoid core perl bug
         * Various small fixes to keep -DDEBUGGING perl happy

0.30    2020-06-20
         * Make generated writer methods return $self, for convenient chaining
         * Apply argument checking to generated accessor methods
         * Improved performance of constructor, by storing BUILD blocks
           directly in the class metadata, avoiding runtime method lookup
         * Updates for XS::Parse::Sublike 0.10

0.29    2020-06-16
         * Accept :override attribute on methods
         * Accept runtime expressions as `has $slot = DEFAULT`
         * Added Devel::MAT::Dumper::Helper support

         * Fix various compiler warnings

0.28    2020-06-14
         * Declare correct version of XS::Parse::Sublike in configure_requires
           as we need it at Build.PL time
         * Fix printf formats for SLOTOFFSET arguments
         * Fix github URL in docs

0.27    2020-06-13
         * Support :reader :writer :mutator attributes on slot variables, to
           automatically generate accessor methods for them
         * Accept `BUILD { ... }` without the `method` keyword. Suggest this
           as usual style. Discourage the `method` form.
         * Updated advice to module authors on how to declare package/VERSION
           sufficient to keep toolchain modules happy

0.26    2020-04-27
         * Sanity-checking of ->add_slot names
         * Permit "anonymous" slots with sigils but no names; accessed only
           via $slotmeta->value
         * Warn when $self lexical is shadowed (partly fixes RT132428)

         * Ensure to run GETMAGIC on ->add_slot names
         * Removed extranous and undeclared `use Devel::MAT::Dumper` from unit

0.25    2020-04-24
         * Further expanded the (undocumented) MOP API
            + Added beginnings of O:P:MOP::Class, O:P:MOP::Slot sufficient to
              create classes and add slots and methods to them

         * Ensure that anonymous methods can perform lexical captures from
           outside scopes (RT132178)
         * Ensure that subclasses without BUILD methods don't double invoke
           that of their superclass
         * Ensure a method's optree begins with OP_NEXTSTATE as debug tools
           may rely on this (RT132413)
         * Don't rely on Test::MemoryGrowth at test time, so tests can still
           pass on non-Linux

0.24    (bad MANIFEST)

0.23    2020-04-21
         * Add another new :repr type of autoselect, which chooses the most
           appropriate type for the situation

0.22    2020-04-17
         * Allow classes to request their representation type using new
           class attribute :repr - choices are native(default), HASH, magic

0.21    2020-04-15
         * Added Object::Pad->begin_class() (undocumented)
           (mostly fixes RT132337 and RT132338)
         * Improved performance of OP_SLOTPAD
         * Handle UTF-8 package names more correctly

         * Fix memory leaks related to OP_METHSTART (RT132332)

0.20    2020-04-10
         * Update suggested style for methods with signatures to put
           whitespace before open paren
         * Use core's `feature "indirect"` in preference to where
           available (perl 5.31.9 onwards)

         * Fix for segfault when compiling inner anon methods inside other
           methods (RT132321)

0.19    2020-04-04
         * More sanity checking of HASH-based foreign superclass constructor
         * More unit testing of reliable destruction of constructor and
           BUILDARGS arguments

         * Allow classic Perl superclass constructors to invoke methods on
           instances (RT132263)
         * Fix SP pointer discipline during method calls in generated

0.18    2020-03-30
         * Implement the BUILDARGS part of constructor protocol
         * Apply the :method attribute to all method subs

0.17    2020-03-27
         * Add some style suggestions for code authors using the module
         * Updated for XS::Parse::Sublike 0.06 API

         * Create a new slot pad for every method instead of reusing one;
           avoids some refcounting issues that cause segfaults (RT132249)

0.16    2020-03-26
         * Always generate the slots AV even with no slots because otherwise
           METHSTART gets upset about no-slot subclasses
         * Capture the `async method` unit tests from Future-AsyncAwait

         * Ensure that object refs or slot values don't hang around in method
           lexicals after they've returned (RT132228)
         * Use OP_STUB to ensure no-slot subclasses don't crash OP_PUSH on
           perls 5.18 to 5.22 (thanks ilmari)

0.15    2020-03-19
         * Use XS::Parse::Sublike 0.04
            + Provides bugfixes for parameters in sub signatures with defaults

         * Handle class-scoped regular lexicals and outer captures

0.14    2020-03-17
         * Use XS::Parse::Sublike 0.02's `register_xs_parse_sublike()` ability

0.13    2020-03-15
         * Use XS::Parse::Sublike for the bulk of the `method` parsing work

         * Inline the code for Perl_package_version() because it isn't
           exported API so not actually visible on non-ELF platforms

0.12    2020-03-10
         * Minor adjustments to order of operations in method keyword parsing
           to closer match core's parser

         * Rename t/80dynamically+Object::Pad.t to use a hyphen because colons
           confuse MSWin32 (RT132087)

0.11    2020-03-07
         * More efficient method enter on perl 5.22 onwards by detecting which
           slots are being used per method and only set those ones up

         * Fix some C99isms in XS code (RT131417)
         * Avoid a C++-style comment in hax/

0.10    2019-11-20
         * Back-compat fixes for perl 5.16, 5.20

0.09    2019-11-20
         * Accept optional version number for `class` declaration and
           `extends` base class
         * Provide a default `BUILDALL` method which invokes all the available
           `BUILD` methods of component packages
         * Unit-test that Syntax::Keyword::Dynamically works correctly with
           object slots and document the fact that `local` does not

         * Generate the constructor as an XSUB so we can find the superclass
           for derived subclasses better and avoid an infinite recusion loop
           on double-subclassing.

0.08    2019-11-10
         * Accept `class Name;` to introduce a toplevel class scope
         * Attempt to `require` the relevant module for `extends` if it
           doesn't appear to be loaded

0.07    2019-10-25
         * Allow subclassing of non-Object::Pad base classes, provided they
           are HASH-based
         * Correct handling of UTF-8 package and slot names (thanks ilmari)

0.06    2019-10-23
         * First attempt at `has $slot = DEFAULT` expressions. Only accepts
           compiletime constants and only on scalar slots

0.05    2019-10-20
         * Implement single-inheriance subclassing

0.04    2019-10-19
         * Croak on attempts to invoke methods on non-instances, non-derived
           classes, etc...
         * Support perls back to 5.16 by various trickery
         * Store array and hash slot variables via RV so the instances are
           well-behaved as perl data structures

0.03    2019-10-18
         * Implement sub signatures
         * Apply automatic pragmata - strict, warnings, -indirect

0.02    2019-10-17
         * `method name :lvalue` and (maybe) other attributes
         * Support perls back to 5.22 due to wrap_keyword_plugin hax

0.01    2019-10-17
        First version, released on an unsuspecting world.