Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: moose/Class-Method-Modifiers
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: moose/Class-Method-Modifiers
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: haarg/prototypes
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Oct 22, 2025

  1. support wrapping subs with prototypes

    While Class::Method::Modifiers is primarily meant to wrap methods, it
    can also be used to wrap functions.  Functions may have prototypes, so
    it would be better if they could be maintained in the wrapper.
    
    This works similarly to the lvalue attribute.  If a before or after is
    applied, the wrapper takes its prototype from the sub being wrapped.  If
    an around is applied, the modifier sub's prototype is used.  This is
    rather strange for arounds, as the parameters it is passed will still
    include the wrapped sub as the first parameter, so the parameters won't
    match the prototype exactly.  Even with that oddness, it still seems to
    be the best option.  This also means an around could change the
    prototype, which will throw warnings.
    haarg committed Oct 22, 2025
    Configuration menu
    Copy the full SHA
    146cf39 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4276805 View commit details
    Browse the repository at this point in the history
  3. test wrap array prototype

    kiwiroy authored and haarg committed Oct 22, 2025
    Configuration menu
    Copy the full SHA
    52f326b View commit details
    Browse the repository at this point in the history
Loading